smooth_operator 1.8.6 → 1.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/smooth_operator/model_schema.rb +5 -3
- data/lib/smooth_operator/version.rb +1 -1
- data/spec/support/models/address.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODMyNWU0M2EwYjA0Mjk1M2I5MWM3YzVhZjU5YzIxYWQxMTFjY2FiYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzhiYzNkYWM5YTI1ZjVkOWNkZTA0MTAwMGVhMTg2ZWQyZDgwYzgwYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzRlZjJkYzlmNzdiNzgxNTJmMjg0Mzc1YjczMDJlNmJlYjUzM2RiZWEwMThj
|
10
|
+
YWEyNDc5MTFlYzI4MDE1ZDRmN2MzMGY0YjEyYmU1ODE5OThjMTYwOWFhNzZk
|
11
|
+
NDEyZmIyZjY1ODZkYjEyOGEwZDI3N2U1NWZmYzExNTBhODg4YTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWJiNGIxZGEzNmM0MDI2NTMwNzIwYTMzOGExYmNlN2E1ZmM1YmU1NzE1NDhh
|
14
|
+
MTFmOTNkMTlhZTRiMmViNzE3ZDRiZTdlMGYyMGUzMmJiNDE2NTgxMjg0YWQw
|
15
|
+
OTQ1NDJhNjU4MjdjMWQ5MDEwZWIzZjA4MjE3MjE4M2UzZjU3MzU=
|
@@ -49,7 +49,9 @@ module SmoothOperator
|
|
49
49
|
if defined? ActiveModel
|
50
50
|
rails_model_name_method
|
51
51
|
else
|
52
|
-
@_model_name
|
52
|
+
return @_model_name if defined?(@_model_name)
|
53
|
+
|
54
|
+
@_model_name = name.split('::').last.underscore.capitalize
|
53
55
|
end
|
54
56
|
end
|
55
57
|
|
@@ -61,8 +63,8 @@ module SmoothOperator
|
|
61
63
|
protected ############## PROTECTED #############
|
62
64
|
|
63
65
|
def rails_model_name_method
|
64
|
-
return '' if
|
65
|
-
|
66
|
+
return '' if @_model_name.nil?
|
67
|
+
|
66
68
|
@model_name ||= begin
|
67
69
|
namespace ||= self.parents.detect do |n|
|
68
70
|
n.respond_to?(:use_relative_model_naming?) && n.use_relative_model_naming?
|