action_args 1.2.0 → 1.2.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: 3ccd1f7e360a0022028839049722507a17dd7cee
4
- data.tar.gz: 47dbf523322610689ceebdab7262f48b5a1c81f4
3
+ metadata.gz: 56bb41c086b61cb8899219a054d6315b81fc0016
4
+ data.tar.gz: 01a5389b849f8f86e2b5e895fe0431532ffb1315
5
5
  SHA512:
6
- metadata.gz: 4120e5d6c4e0ad9e6d264859d98211cd9448f52138cf3fcb4918479195ab6f5c785dec3c8ea0335bc1d4573f7f86d926194965adc8da15feaaadf817d3b7036c
7
- data.tar.gz: a6d93141be8036c6f3728489f9a305be1ca48a826342fa3d01af43bdbcff5b1d0716d0f123bbadd4a33b2685fbec853f4f390345872db6232dd904741af3523f
6
+ metadata.gz: 63f62e395be7b622d6f58985a0f92dd16816fe50c4c6e7fed8d18613b58881ce4efd42b07e50d9ada87dff781bd11b40e1253b848c25a56219702459228ec99d
7
+ data.tar.gz: 29e576be7be35deacf9097253282733f86c275a5d8104df2331aa94ce3e3184dc94823e14f604a631ef972c419850fae1beeba58c0a50d7e9167983d5c6c02b0
@@ -24,8 +24,10 @@ module AbstractController
24
24
  # end
25
25
  #
26
26
  def self.permits(*attributes)
27
- options = attributes.extract_options!
28
- @permitting_model_name = options[:model_name] if options.has_key? :model_name
27
+ if attributes.last.is_a?(Hash) && attributes.last.extractable_options? && attributes.last.has_key?(:model_name)
28
+ options = attributes.pop
29
+ @permitting_model_name = options[:model_name]
30
+ end
29
31
  @permitted_attributes = attributes
30
32
  end
31
33
  # no StrongParameters
@@ -1,3 +1,3 @@
1
1
  module ActionArgs
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_args
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda