0
나는어떻게 하나 이상의 q = 쿼리에 대한 결과를 얻을 수 있습니까?
http://localhost:3000/tags?utf8=✓&q=2%2C12%2C44
그것은 최초의 태그 ID를 위해 작동하지만 (사람들은 태그의 id이다)이 형태의 URL을 제출 내 사이트에 검색 폼이없는 다른
def self.search(query = {})
output = self.scoped
output = output.where(:id => query[:q])
end
TagsController : 쿼리를 할 때
def index
@tags = Tag.search(params)
end