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 +1 -1
- data/denormalize-field.gemspec +1 -1
- data/lib/denormalize-field.rb +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/denormalize-field.gemspec
CHANGED
data/lib/denormalize-field.rb
CHANGED
@@ -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.
|
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:
|
162
|
+
hash: -2555535460486354925
|
163
163
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
164
|
none: false
|
165
165
|
requirements:
|