I have a form_tag written like this :
= form_tag search_backoffice_places_path, {:remote =>“true”, :id => :searchplaceForm } do
… input fields
= submit_tag t(:search)
generated html is correct :
… input fields
upon submit, params received in backoffice/places_controller#search
{“utf8”=>“✓”, “country”=>“United”, “city”=>““, “street_address”=>””, “wording”=>“*”, “commit”=>“Search”, “action”=>“search”, “controller”=>“backoffice/places”, “locale”=>“en”}
backoffice/places_controller.rb
respond_to :html, :js
…
def search
… params received
@places = Place.in_country_like(@country).in_city_like(@city)… # @places found 1
respond_to do |format|
format.html { render :index }
format.js { } <= should render search.js.erb BUT not …
end
end
what’s could be wrong ? thanks for feedback ( using asset pipeline )