alias belongs_to to has_one #533

wants to merge 1 commit into


None yet
3 participants

jvans1 commented Mar 29, 2014

It seems like the most intuitive behavior for working with associations is to have belongs_to work since that's how we declare these relationships in rails

My understanding is that within the domain of serialization, there is only has_many and has_one to represent nested models.

I do understand what you mean though. I ran into the same issue before switching to has_one and realizing that it is more semantically correct.

But, perhaps it would not hurt to alias has_one as belongs_to. Can anyone think of negatives to this?

jvans1 commented Apr 11, 2014

Yea it just seems like it would be the expected behavior. I can't think of any downsides to it.


steveklabnik commented Jul 28, 2014

I'm not interested in changing the DSL in 0.9. We can talk about it for 0.10, though. I'm not sure what the original motivation is for leaving this out, I'd like to talk to @wycats about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment