Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to request parameters from a link in rails?
There is a form
<%= form_tag category_posts_path, :method => 'get' do |f| %>
<%= select_tag(:city_id, options_for_select([['Москва', 1], ['Питер', 2], ['Казань', 3]], {selected: params[:city_id]}),prompt: "Выбрать город",class: "form-control", :onchange => "this.form.submit();") %>
<% end %>
<%= button_to ':city_id',category_posts_path(2), :method=>:get %>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question