simple_action 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/lib/simple_action/concerns/delegates_to_params.rb +18 -0
- data/lib/simple_action/version.rb +1 -1
- data/spec/acceptance_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTZhMGY1MDVmNTI5MWI0MTYyMTA5Mzc0OGYwN2JlMjU2MzI1MWM3OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzYwMzVkYzE4NWM0NTVmODU5NGU2OWEyZjM3ODhjYWExMWIzZmY1MA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTUyMWNmODk1Mjg0YWEzMzg3MzVhMDAwODQ0ZDcxMTBhZTdlOTIwMDk1Yjk4
|
10
|
+
NjUzN2E2ZWZmZTQ5ZmI5ZjE4OGY5NTg3ZTdlN2U2ZmU4ZTgxMzZhNzk1Yjk0
|
11
|
+
MzJmYjdhNjI3YjI1MzcxZTdkNGUzNThlNjg2YWVkODE5YjhjOTU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTIwYzg5MDQxYmMzYmY1Y2ViYjcwMjQ1OWEwZDk2NjA2NWI0ZDU4NDU5NmEy
|
14
|
+
Y2E3Y2FiODBkYTg3NjIyMmM4YTdhZWUxNGM2N2ZkODkxODYxNTM0Y2Y3Njc0
|
15
|
+
MzYwM2NmM2E5YTMwNGE2ZmRiNDkxYzJmNDJmZTQxYWFkYzJhNjA=
|
data/Gemfile.lock
CHANGED
@@ -5,6 +5,24 @@ module SimpleAction
|
|
5
5
|
module DelegatesToParams
|
6
6
|
extend ActiveSupport::Concern
|
7
7
|
|
8
|
+
class_methods do
|
9
|
+
def respond_to?(sym, include_private = false)
|
10
|
+
pass_to_params_class?(sym) || super(sym, include_private)
|
11
|
+
end
|
12
|
+
|
13
|
+
def method_missing(sym, *args, &block)
|
14
|
+
if pass_to_params_class?(sym)
|
15
|
+
params_class.send(sym, *args, &block)
|
16
|
+
else
|
17
|
+
super(sym, *args, &block)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def pass_to_params_class?(sym)
|
22
|
+
params_class.respond_to?(sym)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
8
26
|
def respond_to?(sym, include_private = false)
|
9
27
|
pass_sym_to_params?(sym) || super(sym, include_private)
|
10
28
|
end
|
data/spec/acceptance_spec.rb
CHANGED
@@ -42,6 +42,12 @@ describe "SimpleAction acceptance spec" do
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
+
describe "#validators_on", validators_on: true do
|
46
|
+
it "equals class name" do
|
47
|
+
SimpleActionAcceptance.validators_on.should eq([])
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
45
51
|
describe "params #model_name", params_model_name: true do
|
46
52
|
it "equals class name::Params" do
|
47
53
|
SimpleActionAcceptance.new.params.model_name.should eq("SimpleActionAcceptance::SimpleActionAcceptanceParams")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_action
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- brycesenz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simple_params
|