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 CHANGED
@@ -1,3 +1,9 @@
1
+ 0.1.2 - 2012-11-15
2
+
3
+ Bug fixes
4
+
5
+ * don't use mass assignment operation for creating new records
6
+
1
7
  0.1.1 - 2012-11-15
2
8
 
3
9
  Enhancements
@@ -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(unique_attribute_symbol => unique_attribute_value)
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 " creating #{clazz}(#{unique_attribute_value})"
16
+ puts "..creating #{clazz}(#{unique_attribute_value})"
16
17
  elsif record.changed?
17
- puts " updating #{clazz}(#{unique_attribute_value})"
18
+ puts "..updating #{clazz}(#{unique_attribute_value})"
18
19
  end
19
20
 
20
21
  begin
@@ -1,5 +1,5 @@
1
1
  module Easy
2
2
  module ReferenceData
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
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.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-14 00:00:00.000000000 Z
12
+ date: 2012-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails