Hi, I am working on a table with name "addresses". However when I do a ruby script/generate scaffold Address, I am not able to access http://localhost:3000/addresses. I am getting the following error. uninitialized constant Addres This error occured while loading the following files: addres.rb How do I resolve this issue. Thanks Silvy MAthews
ruby script/generate scaffold Addresses Address On 1/7/06, Silvy@funmail.com <Silvy@funmail.com> wrote:> Hi, > I am working on a table with name "addresses". However when I do a > ruby script/generate scaffold Address, I am not able to access > http://localhost:3000/addresses. I am getting the following error. > > uninitialized constant Addres > This error occured while loading the following files: > addres.rb > > How do I resolve this issue. > > Thanks > Silvy MAthews > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------------------------------------------------------------- I am Mark Daggett and I approve this message.
Hi Mark, What exactly is the difference between ruby script/generate scaffold Addresses Address and ruby script/generate scaffold Address IF you can explain, that would be really beneficial. Thanks Silvy Mathews -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of M Daggett Sent: Saturday, January 07, 2006 11:25 PM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Rails table pluralizing Issue ruby script/generate scaffold Addresses Address On 1/7/06, Silvy@funmail.com <Silvy@funmail.com> wrote:> Hi, > I am working on a table with name "addresses". However when I do a > ruby script/generate scaffold Address, I am not able to access > http://localhost:3000/addresses. I am getting the following error. > > uninitialized constant Addres > This error occured while loading the following files: > addres.rb > > How do I resolve this issue. > > Thanks > Silvy MAthews > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------------------------------------------------------------- I am Mark Daggett and I approve this message. _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 1/8/06, Silvy@funmail.com <Silvy@funmail.com> wrote:> Hi Mark, > What exactly is the difference between > ruby script/generate scaffold Addresses Address > and > ruby script/generate scaffold Address > > IF you can explain, that would be really beneficial. > Thanks > Silvy MathewsIf you run script/generate scaffold by itself it gives you some docs. $ script/generate scaffold Usage: script/generate scaffold ModelName [ControllerName] [action, ...] ... Judging by that first line... script/generate scaffold Address uses ''Address'' as the model and uses that to infer the controller name (AddressesController) script/generate scaffold Address Addresses would set the controller name explicitly. In this case I think M Dagget has his arguments switched up. But, you shouldn''t have to do that with Address, Rails should be able to pluralize it correctly. The reason you''re getting Addres is something is trying to singularize ''Address.'' -- rick http://techno-weenie.net
Thanks Rick. -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Rick Olson Sent: Sunday, January 08, 2006 9:16 AM To: rails@lists.rubyonrails.org Subject: Re: [Rails] Rails table pluralizing Issue On 1/8/06, Silvy@funmail.com <Silvy@funmail.com> wrote:> Hi Mark, > What exactly is the difference between ruby script/generate scaffold > Addresses Address and ruby script/generate scaffold Address > > IF you can explain, that would be really beneficial. > Thanks > Silvy MathewsIf you run script/generate scaffold by itself it gives you some docs. $ script/generate scaffold Usage: script/generate scaffold ModelName [ControllerName] [action, ...] ... Judging by that first line... script/generate scaffold Address uses ''Address'' as the model and uses that to infer the controller name (AddressesController) script/generate scaffold Address Addresses would set the controller name explicitly. In this case I think M Dagget has his arguments switched up. But, you shouldn''t have to do that with Address, Rails should be able to pluralize it correctly. The reason you''re getting Addres is something is trying to singularize ''Address.'' -- rick http://techno-weenie.net _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails