simple_form 3.3.0 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of simple_form might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/simple_form/form_builder.rb +1 -1
- data/lib/simple_form/version.rb +1 -1
- data/test/support/models.rb +17 -17
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d026bcdacbcb386673f3785a25ef90cfd238ad9
|
4
|
+
data.tar.gz: d1172ebf284c52c339aa055de433138c49b65f55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e18ee8cf266597533f6b732a544299eb46168013c6c20cbea36805b5da7c2d419ed2403011f22b015fbf26aa1a6d02ef71f3a4ad9ead7b60e4966bfec41c3d5a
|
7
|
+
data.tar.gz: 21e536b6a81a608cf18c472cccc78c3e49ca382afb398867fbf74a2f5e9614d87ebc40602051fdec005810f39b49d8cfa2302259bc4ceef3f9a6536941c641c5
|
data/CHANGELOG.md
CHANGED
@@ -550,7 +550,7 @@ module SimpleForm
|
|
550
550
|
|
551
551
|
def find_attribute_column(attribute_name)
|
552
552
|
if @object.respond_to?(:type_for_attribute) && @object.has_attribute?(attribute_name)
|
553
|
-
@object.type_for_attribute(attribute_name)
|
553
|
+
@object.type_for_attribute(attribute_name.to_s)
|
554
554
|
elsif @object.respond_to?(:column_for_attribute) && @object.has_attribute?(attribute_name)
|
555
555
|
@object.column_for_attribute(attribute_name)
|
556
556
|
end
|
data/lib/simple_form/version.rb
CHANGED
data/test/support/models.rb
CHANGED
@@ -129,23 +129,23 @@ class User
|
|
129
129
|
begin
|
130
130
|
require 'active_model/type'
|
131
131
|
def type_for_attribute(attribute)
|
132
|
-
column_type, limit = case attribute
|
133
|
-
when
|
134
|
-
when
|
135
|
-
when
|
136
|
-
when
|
137
|
-
when
|
138
|
-
when
|
139
|
-
when
|
140
|
-
when
|
141
|
-
when
|
142
|
-
when
|
143
|
-
when
|
144
|
-
when
|
145
|
-
when
|
146
|
-
when
|
147
|
-
when
|
148
|
-
when
|
132
|
+
column_type, limit = case attribute
|
133
|
+
when 'name', 'status', 'password' then [:string, 100]
|
134
|
+
when 'description' then [:text, 200]
|
135
|
+
when 'age' then :integer
|
136
|
+
when 'credit_limit' then [:decimal, 15]
|
137
|
+
when 'active' then :boolean
|
138
|
+
when 'born_at' then :date
|
139
|
+
when 'delivery_time' then :time
|
140
|
+
when 'created_at' then :datetime
|
141
|
+
when 'updated_at' then :datetime
|
142
|
+
when 'lock_version' then :integer
|
143
|
+
when 'home_picture' then :string
|
144
|
+
when 'amount' then :integer
|
145
|
+
when 'attempts' then :integer
|
146
|
+
when 'action' then :string
|
147
|
+
when 'credit_card' then :string
|
148
|
+
when 'uuid' then :string
|
149
149
|
end
|
150
150
|
|
151
151
|
ActiveModel::Type.lookup(column_type, limit: limit)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- José Valim
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-08-
|
13
|
+
date: 2016-08-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activemodel
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
180
|
rubyforge_project: simple_form
|
181
|
-
rubygems_version: 2.
|
181
|
+
rubygems_version: 2.5.1
|
182
182
|
signing_key:
|
183
183
|
specification_version: 4
|
184
184
|
summary: Forms made easy!
|