Hey guys,
I recently started with the 'Agile web development with Rails' book by pragmatic programmers after having some early experience with rails but wanting a more structured approach.
I'm happily following the book when they ask me to make a controller admin so I can edit the standard CRUD product model I already created. According to the book I should add the line 'scaffold :product' to my admin_controller and it should run like a charm. Well, my rails only says: "undefined method `scaffold' for AdminController:Class".
I know he's using an older rails version in the book, like 1.8 or something, and I know how to run a normal scaffold but not how to make the admin_controller inherit all the juicy CRUD details from Product like the books statement suggests. I tried copying all the views and the scaffold generated controller code from the product_controller to admin and that works fine, but I was really wondering what the proper way to do this is.
My admin_controller:
class AdminController < ApplicationController
scaffold:product
end