serializable_attributes 1.1.0 → 1.1.1
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.
@@ -82,7 +82,7 @@ module SerializableAttributes
|
|
82
82
|
elsif input.blank?
|
83
83
|
[]
|
84
84
|
else
|
85
|
-
input.map
|
85
|
+
input.map { |item| @item_type.parse(item) }
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
@@ -139,4 +139,3 @@ module SerializableAttributes
|
|
139
139
|
end
|
140
140
|
self.types = {}
|
141
141
|
end
|
142
|
-
|
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
|
|
12
12
|
## If your rubyforge_project name is different, then edit it and comment out
|
13
13
|
## the sub! line in the Rakefile
|
14
14
|
s.name = 'serializable_attributes'
|
15
|
-
s.version = '1.1.
|
16
|
-
s.date = '2012-06-
|
15
|
+
s.version = '1.1.1'
|
16
|
+
s.date = '2012-06-18'
|
17
17
|
s.rubyforge_project = 'serializable_attributes'
|
18
18
|
|
19
19
|
## Make sure your summary is short. The description may be as long
|
data/test/types_test.rb
CHANGED
@@ -39,4 +39,13 @@ class SerializedAttributesTypesTest < ActiveSupport::TestCase
|
|
39
39
|
assert_equal nil, type.parse("")
|
40
40
|
end
|
41
41
|
|
42
|
+
test "array type does not modify inputs when parsing" do
|
43
|
+
type = SerializedAttributes::Array.new :type => :integer
|
44
|
+
params = { :language_ids => [""] }
|
45
|
+
|
46
|
+
type.parse params[:language_ids]
|
47
|
+
|
48
|
+
assert_equal({ :language_ids => [""] }, params)
|
49
|
+
end
|
50
|
+
|
42
51
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serializable_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 1.1.
|
9
|
+
- 1
|
10
|
+
version: 1.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Rick Olson
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-06-
|
19
|
+
date: 2012-06-18 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: activerecord
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
requirements: []
|
105
105
|
|
106
106
|
rubyforge_project: serializable_attributes
|
107
|
-
rubygems_version: 1.8.
|
107
|
+
rubygems_version: 1.8.24
|
108
108
|
signing_key:
|
109
109
|
specification_version: 2
|
110
110
|
summary: Store a serialized hash of attributes in a single ActiveRecord column.
|