ruby on rails - Ransack - Unknown action -
i'm new ror , want use ransack on project.
map_controller.rb:
def index @q = tweet.order('id_tweet desc').search(params[:q]) @tweets = @q.result(distinct: true).page(params[:page]).per(5) end
index.html.erb:
<%= search_form_for @q |f| %> <%= f.text_field :text_cont, :value => 'filter...' %> <%= f.submit "src",:class => "btnsrc"%> <% end %>
however, not work. searching "foo", link:
http://0.0.0.0:3000/tweets?utf8=%e2%9c%93&q%5btext_cont%5d=foo&commit=src
and this:
routing error
no route matches [get] "/tweets" try running rake routes more information on available routes.
what's happening? can help?
solved.
route problem, imagined.
match '/tweets' => 'map#index'
this solved problem.
Comments
Post a Comment