跳到内容 跳到搜索

Active Record 属性方法查询

方法
Q

实例公共方法

query_attribute(attr_name)

别名:attribute?
# File activerecord/lib/active_record/attribute_methods/query.rb, line 13
def query_attribute(attr_name)
  value = self.public_send(attr_name)

  query_cast_attribute(attr_name, value)
end