Hello I have a MySQL Table named: sorties I have generated RAILS code using: generate scaffold Sortie Admin It succesfully geneates the code sorti.rb, with Sortie < ActiveRecord::Base and admin_controller.rb with references to @sortie and Sortie.find etc But when I try to browse to http://localhost:3000/admin/list I get: "uninitialized constant Sorty" error, and its trying to load sorty.rb Burried deep down the trace there is: ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ dependencies.rb:123:in `const_missing'' It would appear that RAILS is trying to singlerise ''sorties'', to ''sorty'', instead of ''sortie'' I cannot find use of sorty constant anywhere in my code, so I am confused how to make the correction. Any Help would be appreciated --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jules wrote:> Hello > > I have a MySQL Table named: sorties > I have generated RAILS code using: generate scaffold Sortie Admin > It succesfully geneates the code sorti.rb, with Sortie < > ActiveRecord::Base and admin_controller.rb with references to @sortie > and Sortie.find etc > > But when I try to browse to http://localhost:3000/admin/list I get: > "uninitialized constant Sorty" error, and its trying to load sorty.rb > > Burried deep down the trace there is: > ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ > dependencies.rb:123:in `const_missing'' > > It would appear that RAILS is trying to singlerise ''sorties'', to > ''sorty'', instead of ''sortie'' > I cannot find use of sorty constant anywhere in my code, so I am > confused how to make the correction. > > > Any Help would be appreciatedOpen up config/environment.rb and scroll down to the bottom to the Inflector section. -- Michael Wang --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Cheers I added the folling, which now seems to make my applicaiton work. Inflector.inflections do |inflection| inflection.irregular "sortie", "sorties" end --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---