easy_reference_data 0.1.1 → 0.1.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.
- data/ChangeLog +6 -0
- data/lib/easy/reference_data/refresh.rb +4 -3
- data/lib/easy/reference_data/version.rb +1 -1
- metadata +2 -2
data/ChangeLog
CHANGED
@@ -4,7 +4,8 @@ module Easy
|
|
4
4
|
record = clazz.where(unique_attribute_symbol => unique_attribute_value).first
|
5
5
|
|
6
6
|
if record.nil?
|
7
|
-
record = clazz.new
|
7
|
+
record = clazz.new
|
8
|
+
record.send "#{unique_attribute_symbol}=", unique_attribute_value
|
8
9
|
end
|
9
10
|
|
10
11
|
attributes.each_pair do |key, value|
|
@@ -12,9 +13,9 @@ module Easy
|
|
12
13
|
end
|
13
14
|
|
14
15
|
if record.new_record?
|
15
|
-
puts "
|
16
|
+
puts "..creating #{clazz}(#{unique_attribute_value})"
|
16
17
|
elsif record.changed?
|
17
|
-
puts "
|
18
|
+
puts "..updating #{clazz}(#{unique_attribute_value})"
|
18
19
|
end
|
19
20
|
|
20
21
|
begin
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_reference_data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|