How to specify multiple values in where with AR query interface in rails3

前端 未结 7 1080
时光说笑
时光说笑 2020-12-28 13:31

Per section 2.2 of rails guide on Active Record query interface here:

which seems to indicate that I can pass a string specifying the condition(s), then an array of

7条回答
  •  我在风中等你
    2020-12-28 14:01

    You can use a hash rather than a string. Build up a hash with however many conditions and corresponding values you are going to have and put it into the first argument of the where method.

提交回复
热议问题