diff options
-rw-r--r-- | activerecord/lib/active_record/attribute_methods.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb index 75154a7975..e3ac891520 100644 --- a/activerecord/lib/active_record/attribute_methods.rb +++ b/activerecord/lib/active_record/attribute_methods.rb @@ -202,17 +202,12 @@ module ActiveRecord if column.nil? ActiveSupport::Deprecation.warn(<<-MESSAGE.strip_heredoc) `column_for_attribute` will return a null object for non-existent columns - in Rails 5.0. Use `attribute_exists?` if you need to check for an + in Rails 5.0. Use `has_attribute?` if you need to check for an attribute's existence. MESSAGE end column end - - # Returns whether or not an attribute exists with the given name. - def attribute_exists?(name) - @attributes.include?(name) - end end # A Person object with a name attribute can ask <tt>person.respond_to?(:name)</tt>, |