cerulean 0.12.1 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cerulean.rb +6 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9790519a85cc87e8f646d299fb79118161460a73
4
- data.tar.gz: 4b0b488d32d3e6a03a3fee2fc0715df653e08f67
3
+ metadata.gz: ec3595722e745f49ed704d375cc036472d59573a
4
+ data.tar.gz: 4b0c7543d2ad9969b6fe1c217e478bc87f26ca4f
5
5
  SHA512:
6
- metadata.gz: 62b10a23ea05fdda685ed6b1b61188b68496996c161c59b79215d41f4009b0aa2a55df11811aa22ea1a8050d7867155d3aeae966ea1c4405f4489504f63dc315
7
- data.tar.gz: cf9bdb8deabbccac6d5cecc0e9c516c9bf22296c924db3b522106bb14ff5b8e946f759c2f2817eb890d2d4efcf7149a962e8bf838bc7427c4fe707bc26e284ab
6
+ metadata.gz: fc0fb08883f716fd3d62d98c4cec422861650136feb954c1f50d6d8273a527ea1fa98a7e299399bcb566c332ba6cd310f1b5f8cc33b9efffef414af97f20e811
7
+ data.tar.gz: 40432915d3f83af14f1d2195fb8ca9115f538c32fe5869fefd49513edfefabc07e4430e2a01ec318140a818991aef5831b46ca1a664ca7fdf38590081a771e2b
data/lib/cerulean.rb CHANGED
@@ -120,11 +120,14 @@ module Cerulean
120
120
 
121
121
  before_action do
122
122
  if meta.has_key?(:form)
123
+ p = params
124
+ p = p.permit! if params.respond_to?(:permit!)
125
+
123
126
  if meta[:form].has_key?(:key) && meta[:form][:key]
124
- @form = meta[:form][:klass].new(params[meta[:form][:key]])
125
- else
126
- @form = meta[:form][:klass].new(params)
127
+ p = params[meta[:form][:key]]
127
128
  end
129
+
130
+ @form = meta[:form][:klass].new(p)
128
131
  end
129
132
 
130
133
  if meta.has_key?(:params)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cerulean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Kestell