On Sep 7, 2012, at 2:07 AM, Soichi Ishida wrote:
> Rails 3.1.3
> ruby 1.9
>
> I have a model called, "Give". I understand that it may not be a good
> choice for a model, but couldn't be helped.
>
> Rails seems to have recognized its singular form to be "gife" rather
> than "give", which I hoped to be.
> So, I put in routes.rb
>
> resources :gives, :singular => :give
>
> But the routes still show
>
> new_gife GET /gives/new(.:format)
> {:action=>"new", :controller=>"gives"}
> edit_gife GET /gives/:id/edit(.:format)
> {:action=>"edit", :controller=>"gives"}
> gife GET /gives/:id(.:format)
> {:action=>"show", :controller=>"gives"}
>
> Do I need to do something else to let it change the singular form of
> "Gives" to be "give"?
Wow, that is really odd. Gife isn't even a word, as far as I can tell. You can
change this in the inflections.rb file in your config/initializers folder. It's
pretty well commented and should work for this case.
Walter
>
> Thanks.
>
> soichi
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> 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 https://groups.google.com/groups/opt_out.
>
>
--
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 https://groups.google.com/groups/opt_out.