Since I upgraded from Rails 0.13.1 to 0.14.1 "generate scaffold <Model> <Controller>" doesn''t take any notice of the controller parameter. Anyone else suffering from this? E.g.: C:\Ruby\work\test>ruby script\generate scaffold User Admin exists app/controllers/ exists app/helpers/ create app/views/users exists test/functional/ dependency model exists app/models/ exists test/unit/ exists test/fixtures/ create app/models/user.rb create test/unit/user_test.rb create test/fixtures/users.yml create app/views/users/_form.rhtml create app/views/users/list.rhtml create app/views/users/show.rhtml create app/views/users/new.rhtml create app/views/users/edit.rhtml create app/controllers/users_controller.rb create test/functional/users_controller_test.rb create app/helpers/users_helper.rb create app/views/layouts/users.rhtml create public/stylesheets/scaffold.css Note - I''m new to Rails and it''s quite possible I''m doing something wrong. Thanks for any help, David
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Torben Wölm answered as follows: That''s a bug which is fixed now -- it causes controller names to be ignored (http://dev.rubyonrails.org/ticket/2537) - --------------------------- either update to the svn trunk or downgrade to 0.13.1 ... kind regards Sven Am 25.10.2005 um 21:16 schrieb David Easley:> Since I upgraded from Rails 0.13.1 to 0.14.1 "generate scaffold > <Model> > <Controller>" doesn''t take any notice of the controller parameter. > Anyone > else suffering from this? E.g.: > > C:\Ruby\work\test>ruby script\generate scaffold User Admin > exists app/controllers/ > exists app/helpers/ > create app/views/users > exists test/functional/ > dependency model > exists app/models/ > exists test/unit/ > exists test/fixtures/ > create app/models/user.rb > create test/unit/user_test.rb > create test/fixtures/users.yml > create app/views/users/_form.rhtml > create app/views/users/list.rhtml > create app/views/users/show.rhtml > create app/views/users/new.rhtml > create app/views/users/edit.rhtml > create app/controllers/users_controller.rb > create test/functional/users_controller_test.rb > create app/helpers/users_helper.rb > create app/views/layouts/users.rhtml > create public/stylesheets/scaffold.css > > > Note - I''m new to Rails and it''s quite possible I''m doing something > wrong. > > Thanks for any help, > David > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDXort9InEB7mkKxoRAh8hAJ9/bGTH/3ZW1TvwLMmc7h/aoy3zAQCgpMAj VbFt3AYcAhmk/5klZVzZAk8=cTyw -----END PGP SIGNATURE-----
As an alternative to downgrading or updating to svn, you could just change one line of code in your scaffold_generator.rb. Find the line that says: @controller_name = args.shift || ActiveRecord::Base.pluralize_table_names ? @name.pluralize : @name and change it to: @controller_name = args.shift || ( ActiveRecord::Base.pluralize_table_names ? @name.pluralize : @name ) That ought to fix you right up :-) More info here: http://dev.rubyonrails.org/ticket/2562 Sean :::: DataFly.Net :::: Complete Web Services http://www.datafly.net