invisible_controller 0.2.2 → 0.3

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: 94051ab670e25620fd2a2ca240eb7f9a9f0e7ea9
4
- data.tar.gz: 30c18a94ac2f8747e6862a25fec44461e3065e89
3
+ metadata.gz: 7518295f48d1fd6b76329ddabc5e3cf02c158cdb
4
+ data.tar.gz: 757165bef455d20a104f9ca31b4aa4afb4cf4085
5
5
  SHA512:
6
- metadata.gz: 1d245741469f9b6073eb8b8f34e59b15da63fd0dd6285dea6120c40736f2ae4b99864c1482b01ad27e512c16d0858e20c781d14fb16cbd90da410f1b554283ab
7
- data.tar.gz: 6a202b8eda9a86603caa47153e4a0cb4db7ba8aa5baff67ef1aef3b1930d7ebd7eb86881217eea80fa52b83556b32fffce0bd7ae5ab418caba62c1df3a1dc3cc
6
+ metadata.gz: 95c77701932cf863ef26f714c1ada4cf698618f71e7d1b4a42a07a164d029c6e8d9abef5dacb333dcaf34a9941d838c03777d2af675b4cbe616de822f3424717
7
+ data.tar.gz: c12053dea8c5b090854131a5bb5acea452e524cefb964be81663ef4ad7060b8205f3daeb6f96bd4b547bb21047ff6cc859f7335d8fc35ac62d11c1497949c7b9
@@ -102,7 +102,10 @@ module InvisibleController
102
102
  has_one? ? active_class.send(resource_name) : active_class.find(params[:id])
103
103
  end
104
104
  def klass() resource_name.classify.constantize rescue Class end
105
- def permitted_params() params.permit( resource_name.to_sym => (@resource || klass).whitelisted ) end
105
+ def permitted_params()
106
+ params[resource_name.to_sym] ||= params[:base]
107
+ params.permit( resource_name.to_sym => (@resource || klass).whitelisted )
108
+ end
106
109
  def processed_params() permitted_params[resource_name] end
107
110
  end
108
111
  end
@@ -1,3 +1,3 @@
1
1
  module InvisibleController
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: invisible_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moody
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-19 00:00:00.000000000 Z
11
+ date: 2017-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails