跳至內容 跳至尋找

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