Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Ransack gem 可以为同一值生成多列的 SQL 搜索吗?
例如,诸如“名字或姓氏包含'James'的用户”之类的东西。
是的,这是一个例子:
MyModel.search(:firstname_or_lastname_cont => "James").result