Why is Scaffolding Not Working in Ruby on Rails?

Posted by Timmy on Stack Overflow See other posts from Stack Overflow or by Timmy
Published on 2010-04-15T11:01:24Z Indexed on 2010/04/15 11:03 UTC
Read the original article Hit count: 217

Filed under:
|

I created a controller and a model. The controller is called "Admin" and the model is called "Album". I edited database.yml with proper info and did the rake db:migrate command which didn't return any errors and did migrate the db inside schema.rb. Inside the controller I wrote:

class AdminController < ApplicationController

  scaffold :album

end

Next I started my server and went to http://localhost:3000/admin but instead of seeing the typical CRUD page I get the following error:

app/controllers/admin_controller.rb:3

Request

Parameters: 

None

Show session dump

--- 
flash: !map:ActionController::Flash::FlashHash {}


Response

Headers: 

{"cookie"=>[],
 "Cache-Control"=>"no-cache"}

Any idea why?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about scaffolding