instance method
changes_from_zero_to_string?
Ruby on Rails 3.2.22.5
Since v3.2.22.5 Last seen in v3.2.22.5 PrivateSignature
changes_from_zero_to_string?(old, value)
No documentation comment.
Parameters
-
oldreq -
valuereq
Source
# File activerecord/lib/active_record/attribute_methods/dirty.rb, line 105
def changes_from_zero_to_string?(old, value)
# For columns with old 0 and value non-empty string
old == 0 && value.is_a?(String) && value.present? && value != '0'
end
Defined in activerecord/lib/active_record/attribute_methods/dirty.rb line 105
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::AttributeMethods::Dirty