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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTg1N2FhNjBlOTY1NDYyMGRhMThlYWJlMzE2M2UzY2U4MWY3ZDUxYw==
4
+ ODMyNWU0M2EwYjA0Mjk1M2I5MWM3YzVhZjU5YzIxYWQxMTFjY2FiYw==
5
5
  data.tar.gz: !binary |-
6
- Zjk1M2U1ZjVmNjhhYWMyOTliODRjNmZkMDMwNmRlMzU5ZWU3NWYyZg==
6
+ YzhiYzNkYWM5YTI1ZjVkOWNkZTA0MTAwMGVhMTg2ZWQyZDgwYzgwYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDdkODNlMDdkMDhkYzBkYTc5ZjdkYTlmMGU3OWQ4MDZjNGE1Y2NiNDNjMTU2
10
- OTZmODk5NDkwMmYyNmE5Mzk2ZDk0MjZlODY3ZmIxZDgzMzYyNGUxZmM4MTg2
11
- MWRmM2NmZjJiZGViNTY1NjllMGIzZDU2N2U3N2YwMGI3MWQ5ZDI=
9
+ YzRlZjJkYzlmNzdiNzgxNTJmMjg0Mzc1YjczMDJlNmJlYjUzM2RiZWEwMThj
10
+ YWEyNDc5MTFlYzI4MDE1ZDRmN2MzMGY0YjEyYmU1ODE5OThjMTYwOWFhNzZk
11
+ NDEyZmIyZjY1ODZkYjEyOGEwZDI3N2U1NWZmYzExNTBhODg4YTM=
12
12
  data.tar.gz: !binary |-
13
- MGYyODNhNDQ4MzUzNTE2NjkxNzdlYjkwYzY1YzE4MzkzMjJjMzEyNGQ3NmEw
14
- NGI0YWI0YjM3OWNkMmNjZGZmNmUxYzdmM2VjYzU2YTk1MmMxNzVmNTcxZDU2
15
- OWYxNTlhNGFhYzFmNmMzYWU2OTUzMmEzMGM4MGUxNGU3YzgxODM=
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 ||= name.split('::').last.underscore.capitalize
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 Helpers.blank?(@_model_name)
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?
@@ -1,3 +1,3 @@
1
1
  module SmoothOperator
2
- VERSION = "1.8.6"
2
+ VERSION = "1.8.7"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  class Address < SmoothOperator::Base
2
- self.model_name = ''
2
+ self.model_name = nil
3
3
 
4
4
  self.endpoint_user = 'admin'
5
5
  self.endpoint_pass = 'admin'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smooth_operator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.6
4
+ version: 1.8.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - João Gonçalves