scaffold in Rails 2

1 view
Skip to first unread message

Arash

unread,
Nov 4, 2007, 7:04:04 PM11/4/07
to Ruby on Rails: Talk
Hi,
I am trying rails 2 and the dynamic scaffolding does not work. I
wonder if the syntax changed or what?

s.ross

unread,
Nov 4, 2007, 7:28:56 PM11/4/07
to rubyonra...@googlegroups.com

William Pratt

unread,
Nov 4, 2007, 8:19:21 PM11/4/07
to rubyonra...@googlegroups.com
You can still get the same behavior by using the scaffold generator
included with rails, only the ActionController#scaffold method has
been removed. If you wanted scaffolding for the Product model, try
running script/generate Product. If you run script/generate with no
options, it will give you a quick help with examples. This is better
anyway as it creates the controller with all of the relevant code
included allowing you to see and change it.

Hope this helps.

-Bill

On Nov 4, 2007, at 4:04 PM, Arash wrote:

Max Williams

unread,
Nov 5, 2007, 4:36:26 AM11/5/07
to rubyonra...@googlegroups.com
William Pratt wrote:
> You can still get the same behavior by using the scaffold generator
> included with rails, only the ActionController#scaffold method has
> been removed. If you wanted scaffolding for the Product model, try
> running script/generate Product. If you run script/generate with no
> options, it will give you a quick help with examples. This is better
> anyway as it creates the controller with all of the relevant code
> included allowing you to see and change it.
>
> Hope this helps.
>
> -Bill

As far as i can tell, scaffold hasn't been removed as such - instead its
functionalty has been replaced with that of the old scaffold_resource,
which is used to make a RESTful scaffold. In other words, the scaffold
has been changed to be RESTful by default. This is going to break a lot
of tutorials i think. Bill, have you experienced otherwise?
--
Posted via http://www.ruby-forum.com/.

CCH

unread,
Nov 5, 2007, 8:26:40 AM11/5/07
to Ruby on Rails: Talk
Hi Arash

IMHO, I think you would be better off looking at Active Scaffold.

CCH
http://cch4rails.blogspot.com

Max Williams

unread,
Nov 5, 2007, 11:35:14 AM11/5/07
to rubyonra...@googlegroups.com

I beg your pardon, Steve, dynamic scaffolding *has* been removed but the
non-dynamic, generated scaffolding has merely been changed to the
restful version.

Reply all
Reply to author
Forward
0 new messages