mongoid_denormalize 0.4.1 → 0.4.2

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.
@@ -103,12 +103,12 @@ module Mongoid::Denormalize
103
103
  end
104
104
 
105
105
  def assign_and_save(obj, assignments, prefix)
106
- attributes_hash = Hash[assignments.collect do |assignment|
106
+ attributes_hash = Hash[assignments.collect { |assignment|
107
107
  if self.changed_attributes.has_key?(assignment[:source_field].to_s) ||
108
108
  self.changed_attributes.has_key?(assignment[:source_field].to_sym)
109
109
  ["#{prefix}_#{assignment[:source_field]}", assignment[:value]]
110
110
  end
111
- end]
111
+ }.compact]
112
112
 
113
113
  unless attributes_hash.empty?
114
114
  # The more succinct update_attributes(changes, :without_protection => true) requires Mongoid 3.0.0,
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Denormalize
3
- VERSION = '0.4.1'
3
+ VERSION = '0.4.2'
4
4
  end
5
- end
5
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_denormalize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -86,6 +86,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
86
  - - ! '>='
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
+ segments:
90
+ - 0
91
+ hash: -889189390443941496
89
92
  required_rubygems_version: !ruby/object:Gem::Requirement
90
93
  none: false
91
94
  requirements: