blob: 0154ee35f8c21bd782b7c63e61018803de75d509 (
plain) (
tree)
|
|
module ActiveRecord
module AttributeMethods
module Query
extend ActiveSupport::Concern
included do
attribute_method_suffix "?"
end
def query_attribute(attr_name)
_attributes.has?(attr_name)
end
private
# Handle *? for method_missing.
def attribute?(attribute_name)
query_attribute(attribute_name)
end
end
end
end
|