-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
Presently, has_attribute? is significantly different than what ActiveRecord does. Here is AR's definition:
- File activerecord/lib/active_record/base.rb, line 1667
def has_attribute?(attr_name)
@attributes.has_key?(attr_name.to_s)
end
Currently, has_attribute? is simply an alias to attribute_present?
def attribute_present?(name)
attribute = read_attribute(name)
! attribute.blank? || attribute == false
end
alias :has_attribute? :attribute_present?