Scaffolding broken in Rails 2.1.0

Hi,

I trying to follow the tutorial in Agile Web D. with Rails
Second Ed using Rails 2.1.0. So far I’ve overcome problems with
missing scaffolding, missing classic_pagination, missing svn (required
to install classic_pagination and no error messages about ) and
default not being supported by MySQL in migrations.

The latest problem appears to be a bug in the scaffolding.

The http://localhost:3000/admin/new action churns out a form with a
broken action url e.g:

If you hack the html with firebug to this:

It works fine.

There appears to be a post about this in Korean here.
http://forum.rubykr.org/viewtopic.php?t=6560 but I can’t understand
it.

Does anybody know how to fix this?

Thanks,

Alex

Oscar Del B. schrieb:

Please use the version of rails that is used in the book
Or buy the latest version of it:
Agile Web D. with Rails 3rd Edition

Martin

Please use the version of rails that is used in the book

2008/6/17, Alex B. [email protected]:

On Jun 17, 1:35 pm, “Oscar Del B.” [email protected] wrote:

Please use the version of rails that is used in the book

Other people have suggested this, but what’s the point of learning an
obsolete version of rails when the new one is so different?

It’s ok to have the second edition, that is a fantastic book, you only
need
to use the same version of the book. sudo gem install rails -v 1.2.6
should
do the job.Happy learning.

2008/6/17, Alex B. [email protected]:

On Jun 17, 1:49 pm, Martin B. [email protected] wrote:

Oscar Del B. schrieb:> Please use the version of rails that is used in the book

Or buy the latest version of it:
Agile Web D. with Rails 3rd Edition

Martin

I’ve seen this is available but I’ve only just bought the 2nd ed!

But, you can get the Beta version PDF right now:

-Rob

Not out until October.

On 17 Jun 2008, at 15:56, Rob B. wrote:

But, you can get the Beta version PDF right now:

Pragmatic Bookshelf: By Developers, For Developers

Although if you don’t know rails at all then working from a half done
book might be an exercise in frustation.

Fred

Alex B. wrote:

On Jun 17, 1:35 pm, “Oscar Del B.” [email protected] wrote:

Please use the version of rails that is used in the book

Other people have suggested this, but what’s the point of learning an
obsolete version of rails when the new one is so different?

The new rails isn’t as different as it seems - it’s just that all the
differences seem to be magnified by the scaffolding. The only real
difference is the greater emphasis on restful routing, and some new
conventions for controller actions. But like i say if you’re using
scaffolding it’s very hard to follow.

In your case i’d recommend using the older version of rails to follow
the tutorials. Then, find some RESTful rails tutorials on the net and
follow them using the newer rails - you will stand a much better chance
of understanding what you are doing.

If you bought it after XXX(see on their hp) you can get the new version
for free.

Alex B. schrieb:

I wouldn’t take that for granted–send them an e-mail & ask. I’ve found
them quite helpful…

Good luck!

Thanks for your email.

On Jun 17, 4:28 pm, Martin B. [email protected] wrote:

If you bought it after XXX(see on their hp) you can get the new version
for free.

Thanks for pointing that out, but I think you have to have bought the
PDF directly from them, I bought a hardcopy from Amazon.co.uk only a
month ago :frowning:

The new rails isn’t as different as it seems - it’s just that all the
differences seem to be magnified by the scaffolding. The only real
difference is the greater emphasis on restful routing, and some new
conventions for controller actions. But like i say if you’re using
scaffolding it’s very hard to follow.

I’ve downloaded the source code for the 3rd ed. of the book and diffed
it against the 2nd ed. It seems that the authors have taken the same
approach as me: they’ve just called the controller ‘products’ instead
of ‘admin’. (presumably because the ror 2.x generate scaffold script
forces the controller name to be the same as the model) So far so
good …