denormalize-field 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "denormalize-field"
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Len Smith"]
@@ -13,13 +13,13 @@ module DenormalizeFields
13
13
  self.send "#{_denormalized_field_name}=", self.send(key).send(_field_name)
14
14
  end
15
15
  _original_klass = self.class
16
+ end
16
17
 
17
- _klass = key.to_s.camelize.constantize
18
- _klass.after_save do
19
- if self.send "#{_field_name}_changed?"
20
- self.send(_original_klass.name.downcase.pluralize).each do |child|
21
- child.update_attribute _denormalized_field_name, self.send(_field_name)
22
- end
18
+ _klass = key.to_s.camelize.constantize
19
+ _klass.after_save do
20
+ if self.send "#{_field_name}_changed?"
21
+ self.send(_original_klass.name.downcase.pluralize).each do |child|
22
+ child.update_attribute _denormalized_field_name, self.send(_field_name)
23
23
  end
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: denormalize-field
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -159,7 +159,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
159
  version: '0'
160
160
  segments:
161
161
  - 0
162
- hash: -2310274832214155233
162
+ hash: 3644186894765789279
163
163
  required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  none: false
165
165
  requirements: