%= form_for(@auth_shopping_place, url: @auth_shopping_place.new_record? ? places_path : place_path(@auth_shopping_place), method: @auth_shopping_place.new_record? ? :post : :put, as: :place, remote: true) do |f| %> <% if @auth_shopping_place.errors.any? %>