model_view 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6f1228c9decb1c8c548d0641e35dc935ee4473b
4
- data.tar.gz: db0e1c74ad97f5ffb60de645f7407cf80f79cadc
3
+ metadata.gz: 0a78535559f987bdb7760d0ec28048c54d2fd627
4
+ data.tar.gz: ec311f0d03393ec2ea2a727fa93cac35f910c9bd
5
5
  SHA512:
6
- metadata.gz: 3be2f2b46b4a7a9302716a8f917688c7b5f2d1a01d2a09c4096f62074a9f4336b34850d037623465b2fc96a6045044a9782923b4a3e901d2c544596586105cda
7
- data.tar.gz: 0ba01965454e3aa695bb7068902bdb51ef4b4b4c576c6e6756f492f1cd4d7f109424fe3511e7ee6ae46a23715214f34f8b6eaf519fd115068d691c48e2bae703
6
+ metadata.gz: 2b9c24b0f67b298297f21d831577bfb77820b510876ece1323cebfb4da040359e25d51ff03ad8924ca44f64ac6b0d5623b13a9d5a919b3ec87176db963d3426c
7
+ data.tar.gz: 439c83a56cf80f4cb031bee23d3cb967d86b659ab6315d0dcf66927aab7d8aefdb83cb1c45f421ef594758927cf822710e925eae75332f5a625fc23b6c8f7761
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ # 0.4.1
4
+ * Make setters more robust
5
+
6
+
3
7
  # 0.4.0
4
8
  * Added constant and alias_for helpers
5
9
 
@@ -7,7 +7,7 @@ module ModelView
7
7
 
8
8
  setters = setters_for_scope(scope, scopes)
9
9
 
10
- data.each do |key, value|
10
+ data.symbolize_keys.each do |key, value|
11
11
  setter = if !setters[key].nil?
12
12
  setter_for_key(setters, key)
13
13
  else
@@ -61,6 +61,7 @@ module ModelView
61
61
  .merge(scope_setters)
62
62
  .merge(extended_setters)
63
63
  .merge(included_setters)
64
+ .with_indifferent_access
64
65
  end
65
66
 
66
67
  def extract_setters(scope, scope_data)
@@ -1,3 +1,3 @@
1
1
  module ModelView
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: model_view
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Pretorius