diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/itself.rb (renamed from activesupport/lib/active_support/core_ext/object/self.rb) | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/lib/active_support/core_ext/object.rb b/activesupport/lib/active_support/core_ext/object.rb index 2646342b2e..f1106cca9b 100644 --- a/activesupport/lib/active_support/core_ext/object.rb +++ b/activesupport/lib/active_support/core_ext/object.rb @@ -2,7 +2,7 @@ require 'active_support/core_ext/object/acts_like' require 'active_support/core_ext/object/blank' require 'active_support/core_ext/object/duplicable' require 'active_support/core_ext/object/deep_dup' -require 'active_support/core_ext/object/self' +require 'active_support/core_ext/object/itself' require 'active_support/core_ext/object/try' require 'active_support/core_ext/object/inclusion' diff --git a/activesupport/lib/active_support/core_ext/object/self.rb b/activesupport/lib/active_support/core_ext/object/itself.rb index 5c51bf56c9..df613c4e4f 100644 --- a/activesupport/lib/active_support/core_ext/object/self.rb +++ b/activesupport/lib/active_support/core_ext/object/itself.rb @@ -1,10 +1,10 @@ class Object # Returns the object itself. Useful when dealing with a chaining scenario, like Active Record scopes: # - # Event.public_send(state.presence_in?([ :trashed, :drafted ]) ? :self).order(:created_at) + # Event.public_send(state.presence_in?([ :trashed, :drafted ]) || :itself).order(:created_at) # # @return Object - def self + def itself self end end
\ No newline at end of file |