14 Dec 2007, 15:21

Sultan Bhatia (7 posts)

I am a newbie, and I am learning RoR from “Agile Web Development with Rails” by Thomas & Hansson. In one of the “iteration” this is the code:

class AdminController < ApplicationController scaffold :product end

I have heard of ActiveScaffold, but that seems very complicated. If I don’t use dynamic scaffolding, but create the static scaffold for “product”, how do I jump from one controller to another?

14 Dec 2007, 21:29

Esmaeil Khaksari (3 posts)


I really feel for you. I was in the same place two days ago. Try this, inside of your Depot folder, and let me know if it works:

script/plugin install http://svn.rubyonrails.org/rails/plugins/scaffolding/

19 Dec 2007, 19:28

Sam Rawlins (5 posts)


If you are using the latest Rails (2.0.x), I suggest you read Sean Lynch’s modified “depot” demo (now “exchange”) which accomplishes the same as what is in Chapter 4 of AWDWR. It’s at his blog: http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html

Sam Rawlins.

19 Dec 2007, 21:55

Jankees (4 posts)

Isn’t there a way to downgrade the Rails version, I just started with the rails book and have the same problem. Maybe it’s nicer to learn Rails with the old version and then look at the differences.

Thanks in advance!

19 Dec 2007, 22:09

Jankees (4 posts)

I was trying the new method as mentioned in the article linked above but i get empty insert/edit pages (no input fields) does anyone know what’s the problem?

I get this in the console: ` Processing MoviesController#new (for at 2007-12-19 23:07:34) [GET] Session ID: BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D–57df921ecce52c0d30a91d4ad2bf55d3916d5692 Parameters: {“action”=>”new”, “controller”=>”movies”} Movie Columns (0.002558) SHOW FIELDS FROM movies Rendering template within layouts/movies Rendering movies/new Completed in 0.01069 (93 reqs/sec) | Rendering: 0.00261 (24%) | DB: 0.00256 (23%) | 200 OK [http://localhost/movies/new]


20 Dec 2007, 16:08

Jankees (4 posts)

On this URL you see a screenshot of the problem, http://test.base42.nl/screenshot_002.jpg

I hope someone can help me.

21 Dec 2007, 20:58

Jankees (4 posts)

UPDATE; I just found out why it didn’t work, sorry for bothering you guys. It didn’t work because i did exchange$ ruby script/generate scaffold Movie in stead of exchange$ ruby script/generate scaffold Movie title:string description:text one_sheet_url:string

because of this my scaffold didn’t create the required field on the edit page.

04 Jan 2008, 14:23

Sultan Bhatia (7 posts)

Thanks to everyone who helped me out. Sorry for the delay in saying thanks, I was busy with another project.

06 Jan 2008, 18:42

Travis Erard (1 post)

With Fairlead’s Exchange demo: @rails -d mysql exchange@ will use MySql instead of the new SQLite default.

08 Jan 2008, 14:31

Jochen Hayek (6 posts)

Somebody asked a while ago, how to downgrade. This is what you want to do: ` $ gem install rails –version 1.2.6 `

08 Jan 2008, 14:38

Jochen Hayek (6 posts)

So you see, I know how to downgrade and exercise the book with rails-1.2.x, but what if I want to do rails-2.x ?

I ran into that problem with the dynamic scaffolding as discussed in “create the maintenance application” in ch. 6.1: ` scaffold :product ` And I was told an error message, that didn’t help me a lot.

What’s the easiest way around? Some smart rephrasing of the above “scaffold :product”?

08 Jan 2008, 16:05

Steve Jones (14 posts)

Dynamic scaffolding is deprecated in 2.0. If you want to do AWDWR in rails 2.0.2 you have a thread already exploring that alternative at the following:


and here are some more resources.


15 Jan 2008, 08:17

Bala Paranj (20 posts)

I have upgraded the Depot app to Rails 2.0 version. You can watch the screencast for free at http://www.rubyplus.org/episodes/19-AWDR-Depot-App-using-Rails-2-version.html

The modified code is not distributed by me. Bug Dave, he might distribute my code for educational purpose.

  You must be logged in to comment