On Mon, Jan 23, 2012 at 6:02 PM, Frederick Cheung <
[email protected]> wrote:

>
>
> On Jan 23, 3:10 am, Murilo Urban Monteiro <[email protected]>
> wrote:
>
> >
> > i can find Wave.find(x).department.
> >
> > why of this? uninitialized constant Department::Wafe
> >
>
> I think the inflection rules changed somewhere around 3.0, so when
> rails tries to depluralize :waves, it gets 'wafe' and so looks for a
> class of that name.
>
> You should be able to override that inflection rule by doing something
> like
>
> ActiveSupport::Inflector.inflections do |inflect|
>   inflect.irregular 'wave', 'waves'
> end
>
> in an initializer
>
> To add more to what Fred said, you should already have an initializer
which is specifically for this purpose, look for
config/initializers/inflections.rb file

Chirag
http://sumeruonrails.com



> Fred
>
> --
> 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.
>
>

-- 
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