rails_metadata 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e901aa7424ebd6f4eb6d6f5854d0e9f9009422e
4
- data.tar.gz: 6004562b7a90e7e2ee1de650a27168cd0ec6c8d5
3
+ metadata.gz: c319b4411d2b80846de558ab35065e8f320441c9
4
+ data.tar.gz: b863bac4263dbfa41e0d6f151b39a5b41792ea4e
5
5
  SHA512:
6
- metadata.gz: e8aa0825cba531037b228ad0fd77e8402c17245247daa44e8b859a178d976288b63adce02b590280aa491979d6e46c40fec321826091b4778c3b1138d4d142ad
7
- data.tar.gz: 93560759cf5d786b65528adf6fef4e39382797c5d18cd615a106112adec344345a18295b250c2df8f198ba8ef9587abf63bbdaa164021676ffdea627b554f7fe
6
+ metadata.gz: d8945946fdb36fe7d6c95927294e9a257a6d746d6e41d473a6cf5515e8b95ccd27323d593da4ce5c7a33e85e7af724568b01149ce58c83fb1ad3c99c2ddbba85
7
+ data.tar.gz: 0d4492f872fc0159a85a83af8f510bfe2af99a864636b3557de81a502344730429968b5007c30719632dc48e3d5af296f9cb6942d4f9f7dd3efba06d107c3c0a
@@ -1,3 +1,3 @@
1
1
  module RailsMetadata
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -36,7 +36,11 @@ module RailsMetadata
36
36
  end
37
37
  define_method(name.to_s + '=') do |val|
38
38
  self.metadata = {} unless self.metadata.present?
39
- self.metadata.merge!(name => typecast.call(val))
39
+ if val.present?
40
+ self.metadata.merge!(name => typecast.call(val))
41
+ else
42
+ self.metadata.delete(name)
43
+ end
40
44
  end
41
45
  end
42
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_metadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Neyer