problem with scaffold

Hello, 'm new to Rails... 'm using Agile Web Development with Rails as a reference book.

I have a table named products and a model named product

I used following code in a controller admin

class AdminController < ApplicationController   scaffold :product end

when I start server and navigate to the url http://localhost:3000/admin, I get follow error...

NoMethodError in AdminController#index

undefined method `scaffold' for AdminController:Class

this means I 've not defined an INDEX Method in controller... but the book doesnt say anything regarding this.... Does that mean "scaffold" handles everything?

Any clue to this problem???

Thanks :slight_smile:

http://tpope.us/rubyonrailsfaq.html

Hello Ashit,

class AdminController < ApplicationController

    scaffold :product

end

what u tried to create using the above code and also i think u can access my giving

http://localhost:3000/product, rite?

regards, sumesh