cite-me 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cite_me.rb +4 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b0db38c1ffd2e754041782d7e6267d7a789f83e
4
- data.tar.gz: a0d4bb3526f8d0c537007f6119255a6b2ca08a7e
3
+ metadata.gz: 1e17596ed9d8aa408cdf4cdbd1afe34f00783ea9
4
+ data.tar.gz: b916d59ae615c07b660a03a95a21bd2cb12a38b8
5
5
  SHA512:
6
- metadata.gz: cd7d91f316f65f7514205aaf2977a2d2dbf3ccc4dde63a298468d843a3a1d409514a93771956b4645062bbe94f16ab345793ad74f71896bad9f9cb0c0a5277d2
7
- data.tar.gz: 31e27f25ad696956347def3e2e901494faac56f9cfec9f567821947c74ec70514fd23467470f41a80e28943820f3e05ef989413d7612898a2ef36e0c3717f1d1
6
+ metadata.gz: d18ef202113fe10b837426183cde8a9d67b9cd11f53d04c4eed22a66c162b7508bc62f451c574d57fb498a9d04a3fdb966e29cd7a829b1d16c17c7d118552e61
7
+ data.tar.gz: 60908b6d94e1c98127803b6a1e9fc19bd0ec4fa5819f17e8dc892b67a24d6515de41079f25aa7bb096a0277c23aedf4974d5261cfa588737866d5a1b8915ad73
data/lib/cite_me.rb CHANGED
@@ -108,10 +108,12 @@ class Cite_Me
108
108
  'n.d. '
109
109
  end
110
110
  end
111
-
111
+
112
112
  def clean_hash(options)
113
113
  clean_options = {}
114
- options = options.attributes if !options.is_a? Hash
114
+ if options.class.ancestors.include?(ActiveRecord::Base)
115
+ options = options.attributes
116
+ end
115
117
 
116
118
  ## delete any " in key (usually from ActiveRecord object) and turn it to a symbol
117
119
  ## we also call to_s on any present values in case a date or year is saved
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cite-me
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Smith