invisible_controller 0.1.1 → 0.1.2

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: ff6914125b2b8a9245abe41fdb4b5edd789505ab
4
- data.tar.gz: 743c4b1f2fb63f0bddb8223f47088b4a3fc07798
3
+ metadata.gz: 2b42cb427a7a19e82b07e9c62fe0be91be2d3651
4
+ data.tar.gz: d284efa36dc3de135663c32a3ef1b4ba5b8725fc
5
5
  SHA512:
6
- metadata.gz: a4cfe35839de4c2e74afacd118b0671acf02b96dfacf1e98d69fddcfa0c9437d43cd9380188421b63834dff17363f09774385925584691d2c5a3e1f524e0fbc6
7
- data.tar.gz: e9aaa335940115e418ac7438b2dad9511f5d7895ece9ac202ac195b15d3f52e07381f48cf6b20c2ea4ee1a0ba3136d2340cf0e5a7cbbd5456bd28b96f28289ba
6
+ metadata.gz: 20a37d9a4a8a70d389bc7a5d3c17eaea7ee261c223d2cb78e7e133e3096d8f4011b3dc978021f683bc27727bb321fa40bca2f548f864c1d570bf09798f726836
7
+ data.tar.gz: 0dd37b131188b31bd3d473685c02845d5023523365e9b120170739e0eb66e6df48f75c22fc3ab4f25a5ff9fc8999bf9871bf77280014317e08eea9dd8511ab4b
@@ -77,8 +77,9 @@ module InvisibleController
77
77
  return active_class.send(current_scope) if index?
78
78
  return active_class.new(processed_params) if new?
79
79
  return active_class.create(processed_params) if create?
80
- active_class.find(params[:id])
80
+ define_singleton_resource
81
81
  end
82
+ def define_singleton_resource() active_class.find(params[:id]) end
82
83
  def klass() resource_name.classify.constantize rescue Class end
83
84
  def permitted_params() params.permit( resource_name.to_sym => klass.whitelisted ) end
84
85
  def processed_params() permitted_params[resource_name] end
@@ -1,3 +1,3 @@
1
1
  module InvisibleController
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
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.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Moody
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-03 00:00:00.000000000 Z
11
+ date: 2015-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  version: '0'
168
168
  requirements: []
169
169
  rubyforge_project:
170
- rubygems_version: 2.2.1
170
+ rubygems_version: 2.4.3
171
171
  signing_key:
172
172
  specification_version: 4
173
173
  summary: RESTful api controllers.