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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b42cb427a7a19e82b07e9c62fe0be91be2d3651
|
4
|
+
data.tar.gz: d284efa36dc3de135663c32a3ef1b4ba5b8725fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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.
|
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-
|
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.
|
170
|
+
rubygems_version: 2.4.3
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: RESTful api controllers.
|