You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generated code for the "cats" example didn't work. When I try to access http://localhost:3000/admin/cats, I have a Uninitialized constant Admin::ResourceController.
My controller code is:
class Admin::CatsController < Admin::ResourceController
def index
@cats = Cat.page(params[:page] || 1).per(50)
end
def new
@cat = Cat.new
end
def create
@cat = Cat.new(params[:cat])
if @cat.save
flash[:notice] = "Successfully created Cat."
redirect_to admin_cats_url
else
render :action => 'new'
end
end
def edit
@cat = Cat.find(params[:id])
end
def update
@page = Cat.find(params[:id])
if @cat.update_attributes(params[:cat])
flash[:notice] = "Successfully updated Cat."
redirect_to admin_cats_url
else
render :action => 'edit'
end
end
def destroy
@cat = Cat.find(params[:id])
@cat.destroy
flash[:notice] = "Successfully destroyed Cat."
redirect_to admin_cats_url
end
end
The text was updated successfully, but these errors were encountered:
The generated code for the "cats" example didn't work. When I try to access http://localhost:3000/admin/cats, I have a
Uninitialized constant Admin::ResourceController
.My controller code is:
The text was updated successfully, but these errors were encountered: