RailsCasts Pro episodes are now free!

Learn more or hide this

piga's Profile

GitHub User: piga

Comments by


I have a problem in my project. I use this:
<%= text_field_tag :tag, nil, {"data-autocomplete-source": Tag.order(:name).map(&:name)} %>
and that outputs:

I need data-autocomplete-source to be array because of autocomplete. In rails console, Tag.order(:name).map(&:name) returns array. Thanks


Hey I used this great video to search my posts by tags. This serch is working:
But instead this serch is not working:
Tag.find(:all, :conditions => ['name LIKE ?', "%#{name}%"]).posts
Thanks for help