denormalize-field 0.1.2 → 0.1.3

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.2
1
+ 0.1.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "denormalize-field"
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
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"]
@@ -6,13 +6,13 @@ module DenormalizeFields
6
6
  def denormalizes(hash)
7
7
  hash.keys.each do |key|
8
8
  _field_name = hash[key]
9
+ _original_klass = self
10
+ _denormalized_field_name = "#{key}_#{_field_name}"
9
11
 
10
12
  before_save do
11
- _denormalized_field_name = "#{key}_#{_field_name}"
12
13
  if self.send(key)
13
14
  self.send "#{_denormalized_field_name}=", self.send(key).send(_field_name)
14
15
  end
15
- _original_klass = self.class
16
16
  end
17
17
 
18
18
  _klass = key.to_s.camelize.constantize
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.2
4
+ version: 0.1.3
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: 3644186894765789279
162
+ hash: -2555535460486354925
163
163
  required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  none: false
165
165
  requirements: