2
在Rails 3我有此查询:导轨4:找到包括现场
Supporter.includes(:person).where("concat(club_member_number, ' ', people.surname, ' ', people.name) LIKE ?", term)
然而,在轨道4,5它througth错误:
ActiveRecord::StatementInvalid Exception: Mysql2::Error: Unknown column 'person.surname'
我怎么能更改查询,为它工作在Rails 4中?
感谢萨里尔,引用了线索! – user1364684 2015-01-21 09:26:09
欢迎:),高兴地帮助 – Salil 2015-01-21 09:51:09