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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8015a9b181b4dcca8b0059d34235fe6305caa669
4
- data.tar.gz: ba2e8bf418b39c90f886afd38c4af998ee141e29
3
+ metadata.gz: ad507c902cd85dc2b04c9cf80848dc34b34e7728
4
+ data.tar.gz: 871a3ba223e7420bfaff936411c6f0a236c1569f
5
5
  SHA512:
6
- metadata.gz: adf2864939a3076b97c2ea74e144d6be9939d8e02f9b9c241374741d46ea58ca6e0f34d9c3e814a9842974aa16d6b14742499e9063e39eb69ddf3a69b652cadb
7
- data.tar.gz: 0ed96a8334b93b66c54c90efe4350fbf0896e56ca757313b429860da3ff76e40105e8b714613f5cc55465d688b38e323c27f335550979aeebf16907e3b333540
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
- klass = operation_of(model_name, verb)
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
@@ -1,3 +1,3 @@
1
1
  module SkinnyControllers
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
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.2
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.2
227
+ summary: SkinnyControllers-0.3.3
228
228
  test_files: []