RailsCasts Pro episodes are now free!

Learn more or hide this

martinomg's Profile

GitHub User: martinomg

Comments by

Avatar

Hello!

This works great!
How can i add to the search query a second variable from the same model?

i used

def self.search(query)
where("title like ?", "%#{query}%")
end

but i also have a little description (post.description) in the index view and i want to add it to the search query.

Ty very much