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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c12e271b03625f2cca73aaf99d1229e212d549b5
4
- data.tar.gz: baa9c72a065dda6000b52852edaafc5f60e38a30
3
+ metadata.gz: 5d026bcdacbcb386673f3785a25ef90cfd238ad9
4
+ data.tar.gz: d1172ebf284c52c339aa055de433138c49b65f55
5
5
  SHA512:
6
- metadata.gz: 625bb4d60627789d65f73dcc2d5aafc7159cb9b66c12a911b6e0ef832075cf3b330d2636b97aa17f8f93037ef2d917b03cf2926ead2b6091a389fd6e3ed22b43
7
- data.tar.gz: 139633282c1518a82841c62cedf6451a983a5058ed6d865f6a295874dac8e9156932b95490e4d3dada97d85c685c9c687a7a25bb926bcd75f3aef00252e33f4b
6
+ metadata.gz: e18ee8cf266597533f6b732a544299eb46168013c6c20cbea36805b5da7c2d419ed2403011f22b015fbf26aa1a6d02ef71f3a4ad9ead7b60e4966bfec41c3d5a
7
+ data.tar.gz: 21e536b6a81a608cf18c472cccc78c3e49ca382afb398867fbf74a2f5e9614d87ebc40602051fdec005810f39b49d8cfa2302259bc4ceef3f9a6536941c641c5
@@ -1,5 +1,11 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 3.3.1
4
+
5
+ ### Bug fix
6
+
7
+ * Fix support for symbols when looking up types with `ActiveModel::Type`.
8
+
3
9
  ## 3.3.0
4
10
 
5
11
  ### enhancements
@@ -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
@@ -1,3 +1,3 @@
1
1
  module SimpleForm
2
- VERSION = "3.3.0".freeze
2
+ VERSION = "3.3.1".freeze
3
3
  end
@@ -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.to_sym
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
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.0
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-25 00:00:00.000000000 Z
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.6.3
181
+ rubygems_version: 2.5.1
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: Forms made easy!