Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alias belongs_to to has_one #533

Closed
wants to merge 1 commit into from

Conversation

jvans1
Copy link

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

@AndyObtiva
Copy link

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
Copy link
Author

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
Copy link
Contributor

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants