Displaying 3 results from an estimated 3 matches for "locationscontrol".
2006 Apr 03
2
undefined method `scaffold'' for #<LocationsController:0xb7a9e858>
Would anybody know why I get this error from this bit of code:
class LocationsController < ApplicationController
def index
scaffold :locations
end
end
This is the way that is demonstrated in the screencast for creating a
quick scaffold. I have done this before. However, I come back to
working with Ruby after about a month on something else and now it
gives this...
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 /loc...
2008 Oct 07
0
Grouping controllers into modules
i have grouping administration controllers into module (admin) for
maintaining more order and logical structure.
then i have modified class controller:
class Admin::LocationsController < ApplicationController
....
end
i have created in views the directory "admin" and put the directory
"locations" into this.
i have setting the routes.rb:
....
map.namespace :admin do |admin|
admin.resources :locations
end
....
but i can''t access to CRUD pa...