Forum: Ruby on Rails Dynamic scaffold not working

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8a8f26706e23c97bc83828fa25421684?d=identicon&s=25 Felipe Sodré Silva (Guest)
on 2007-04-27 01:25
(Received via mailing list)
Hi.

I created a model called "player" using rake db:migration and right
after
went to try a dynamic scaffold to try it.
So I created a controller called "admin" and the admin_controller.rb
became
like this:

class AdminController < ApplicationController
    scaffold :player
end

but when I tried http://localhost:3000/admin/, I got this error message:

uninitialized constant Player


Then I created the scaffold statically by doing script\generate scaffold
player

Now, I can try to access the admin controller and everything goes nice.

I tried to destroy the static scaffold, but then the error came back.

I'm using Ruby on Rails on Windows XP, using Mongrel as server. Is there
any
configuration I should set to make the dynamic scaffold work? I'm
following
the RoR book steps, and there's nothing about this error there.

Thanks in advance

--
Felipe Sodre S. Silva
Engenharia de Computação - Universidade Estadual de Campinas
+55 11 9604-1118
fsodre@gmail.com
http://www.students.ic.unicamp.br/~ra032714
This topic is locked and can not be replied to.