skinny_controllers 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/skinny_controllers/lookup/operation.rb +3 -3
- data/lib/skinny_controllers/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad507c902cd85dc2b04c9cf80848dc34b34e7728
|
4
|
+
data.tar.gz: 871a3ba223e7420bfaff936411c6f0a236c1569f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fd245b0380353a4f4c71839db1e517ae1d04b30e07086fa2324ca0e66bea65362e5d2511f5ebe4ce158852586bb60eb8b887f3b435ab34d3301bd8a546da6f0
|
7
|
+
data.tar.gz: e2ada5f2cb8b6953ed8efd6cc1981a2ab80a8f25daaeee672751adcca4d1bbbe61af1e1b4bc67afaa71c7205c9577f29d7d0c314b62eee53fe9e2c628c57e53a
|
@@ -10,7 +10,8 @@ module SkinnyControllers
|
|
10
10
|
# @return [Class] the operation based on the model name and the verb
|
11
11
|
def operation_of(model_name, verb)
|
12
12
|
klass_name = Lookup::Operation.name_from_model(model_name, verb)
|
13
|
-
klass_name.safe_constantize
|
13
|
+
klass = klass_name.safe_constantize
|
14
|
+
klass || default_operation_class_for(model_name)
|
14
15
|
end
|
15
16
|
|
16
17
|
# @param [String] controller name of the controller class
|
@@ -19,8 +20,7 @@ module SkinnyControllers
|
|
19
20
|
# @return [Class] the class or default
|
20
21
|
def from_controller(controller, verb, model_name = nil)
|
21
22
|
model_name ||= Lookup::Controller.model_name(controller)
|
22
|
-
|
23
|
-
klass || default_operation_class_for(model_name)
|
23
|
+
operation_of(model_name, verb)
|
24
24
|
end
|
25
25
|
|
26
26
|
# dynamically creates a module for the model if it
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skinny_controllers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- L. Preston Sego III
|
@@ -224,5 +224,5 @@ rubyforge_project:
|
|
224
224
|
rubygems_version: 2.4.8
|
225
225
|
signing_key:
|
226
226
|
specification_version: 4
|
227
|
-
summary: SkinnyControllers-0.3.
|
227
|
+
summary: SkinnyControllers-0.3.3
|
228
228
|
test_files: []
|