undefined method error(Instant Rails)

Im new to Ruby on rails. I have installed Instant rails. created my application called "Project". then ->> generated model for it called "device" then->>created a database called project_development and added a column to db/migrate/001_create_devices.rb. then->> run the rake db:migrate command. then->> i generated a controller called "project_controller" and wrote scaffold:device inside it. after that i tried to access the application at localhost:3000\project_controller but its giving error "undefined method `scaffold' for ProjectControllerController:Class"

Please help me out of it.

Thanks in advance

There might be a syntax error near the code where you turn on scaffolding. Would you mind posting the code near the area where you call scaffold?

class ProjectControllerController < ApplicationController scaffold:device end

where device is my model..

Supriya Agarwal wrote:

class ProjectControllerController < ApplicationController scaffold:device end

where device is my model..

stop scaffolding, especially when you are learning.

There needs to be a space.

scaffold :device

scaffold is the name of the method, and :device is a symbol (prefixing : makes something a symbol in Ruby).

(Sorry for the late reply!)

It is best not to use scaffolding at all and hand code things if you are trying to learn.