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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjBmNDY3MDJmMWYwZWUyMjAwNDFmOTVmMmI0NmE0ZWQ2ZDUzNzc3OA==
4
+ NTZhMGY1MDVmNTI5MWI0MTYyMTA5Mzc0OGYwN2JlMjU2MzI1MWM3OA==
5
5
  data.tar.gz: !binary |-
6
- OTc2ZDViMzczNGQ2Y2UyZjczZTFhYWU5MGQ4Njk1YzM5YjJhMjhlMQ==
6
+ NzYwMzVkYzE4NWM0NTVmODU5NGU2OWEyZjM3ODhjYWExMWIzZmY1MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MmZhNDQyM2RlNDlhYzBkN2QyNTUyYzgwY2JmMDdmN2UzMWY0ZDYyNWZlY2Jj
10
- YjMyYTBkYTJhMGVhZjFkMmIzYjM1YTZmYjcyZTc3ZGEyN2M4ODU0NjI1Y2Jm
11
- ZGFiY2MxYTU1MjVmZTk4ZDVhNzdkODkzY2ZhMDc3OTQzZjA4YWI=
9
+ NTUyMWNmODk1Mjg0YWEzMzg3MzVhMDAwODQ0ZDcxMTBhZTdlOTIwMDk1Yjk4
10
+ NjUzN2E2ZWZmZTQ5ZmI5ZjE4OGY5NTg3ZTdlN2U2ZmU4ZTgxMzZhNzk1Yjk0
11
+ MzJmYjdhNjI3YjI1MzcxZTdkNGUzNThlNjg2YWVkODE5YjhjOTU=
12
12
  data.tar.gz: !binary |-
13
- OTZmYmYwZTI5NGRiM2RmYzZiNTJmMGY2OTAxY2JmNzc2YTNkZDlhZWY2YTlh
14
- YWNjODZjMjZlNWRiZWZjN2EwZGI2M2JhYzYyMGNlOGYwNWIwMDRmNDFjMDI1
15
- MTVkNjcwYzNmYmZkYWJiOGYwNzY3YzI5MGUxYzcyYWFlMDUyNmI=
13
+ NTIwYzg5MDQxYmMzYmY1Y2ViYjcwMjQ1OWEwZDk2NjA2NWI0ZDU4NDU5NmEy
14
+ Y2E3Y2FiODBkYTg3NjIyMmM4YTdhZWUxNGM2N2ZkODkxODYxNTM0Y2Y3Njc0
15
+ MzYwM2NmM2E5YTMwNGE2ZmRiNDkxYzJmNDJmZTQxYWFkYzJhNjA=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_action (1.4.4)
4
+ simple_action (1.4.5)
5
5
  simple_params (>= 1.4.5, < 2.0)
6
6
 
7
7
  GEM
@@ -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
@@ -1,3 +1,3 @@
1
1
  module SimpleAction
2
- VERSION = "1.4.5"
2
+ VERSION = "1.4.6"
3
3
  end
@@ -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.5
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-07 00:00:00.000000000 Z
11
+ date: 2015-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_params