search for: locations_url

Displaying 1 result from an estimated 1 matches for "locations_url".

2013 Apr 02
4
gmaps4rails: undefined method `model_name' for NilClass:Class
...on.errors, status: :unprocessable_entity } end end end # DELETE /locations/1 # DELETE /locations/1.json def destroy @location = Location.find(params[:id]) @location.destroy @json = Location.all.to_gmaps4rails respond_to do |format| format.html { redirect_to locations_url } format.json { head :no_content } end end and the _form I use to create the new location: <%= form_for(@location) do |f| %> <% if @location.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@location.errors.count, "err...