has_one
方法本身表示什么意思。
引进了哪些方法,表示什么意思。
有什么参数,表示什么意思,使用后有什么效果。
has_one :author, -> { where(comment_id: 1) }
has_one :employer, -> { joins(:company) }
has_one :dob, ->(dob) { where("Date.new(2000, 01, 01) > ?", dob) }其它
最后更新于