Displaying 1 result from an estimated 1 matches for "to_gmaps4rail".
Did you mean:
to_gmaps4rails
2013 Apr 02
4
gmaps4rails: undefined method `model_name' for NilClass:Class
Hi All,
just in a spot of bother with this gem, I am trying to create a new
location and get the above msg.
here is my controller:
class LocationsController < ApplicationController
# GET /locations
# GET /locations.json
def index
@locations = Location.all
@json = Location.all.to_gmaps4rails
end
respond_to do |format|
format.html # index.html.erb
format.json { render json: @locations }
end
end
# GET /locations/1
# GET /locations/1.json
def show
@location = Location.find(params[:id])
@json = Location.all.to_gmaps4rails
respond_to do |format|...