Make has_attribute? more like ActiveRecord

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • 3.0.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Presently, has_attribute? is significantly different than what ActiveRecord does. Here is AR's definition:

      1. 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?

            Assignee:
            Unassigned
            Reporter:
            Michael Coyne
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: