I've found a difference in the files created by "./script/rails
generate scaffold Model xxx" with rails 2.3.14 and "./script/generate
scaffold Model xxx" with rails 3.0.10 that doesn't make sense to me.
(both with ruby 1.8.7 on Gentoo Linux)

With 2.3.14, near the beginning of app/controllers/xxxes_controller.rb
is the line "@xxxes = Xxx.all" and a few lines later "format.xml
{ render :xml => @xxxes }"   With 3.0.10, the first is "@xxx =
Xxx.all" and the second is has @xxx instead of @xxxes.  All other
references to xxx or xxxes are the same in both versions.  This causes
problems with 3.0.10, because app/views/xxxes/index.html.erb includes
the line "<% @xxxes.each do |xxx| %>" which causes a nil object error.

I've done plenty of searching, but haven't found anything relevant.
Is this a bug, a feature, a side effect of misusing the scaffold
generator, ....?  Most if not all of the docs and tutorials I've found
are not specific about which version of rails they are base on.
Pointers to the right fine manual to read are also welcome, as I'm
still pretty new with both ruby and rails.

Thanks for any assistance.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to