
belongs_to inflector behavior
Reported by Shay Arnett | December 13th, 2008 @ 03:35 PM
The docs say specifically " Pay attention to the pluralization or the related model's name."
So if you are doing to expect the correct pluralization of objects on associations then why even run through the inflector.
Problem
belongs_to :address
Error
/Library/Ruby/Gems/1.8/gems/dm-core-0.9.7/lib/dm-core/associations/relationship.rb:65:in
parent_model': Cannot find the parent_model Addres for
...
Comments and changes to this ticket
-
Dan Kubb (dkubb) December 14th, 2008 @ 03:58 AM
- State changed from unconfirmed to confirmed
I agree with this. We should check belongs_to and see why it tries to singularize the argument passed in. I think it would be better if it assumed the argument was singular, unless there's a good reason otherwise.
-
Dan Kubb (dkubb) January 8th, 2009 @ 04:51 AM
- State changed from confirmed to accepted
- Assigned user set to Dan Kubb (dkubb)
-
Jonathan Stott (namelessjon) February 22nd, 2009 @ 09:20 AM
- State changed from accepted to resolved
Resolved in 0.10.0
See #554
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »