You should take small steps, especially when you are still trying to
get to grips with the language.
I'll help you a little by pointing out that this can be a single
query. What you are trying to do is find stuff that match the
conditions 'name LIKE ? OR place LIKE ?'. So this should be a one line
method.
I would also suggest you look up named_scope (railscasts.com has a
screencast about it) which you could use here.