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

How to use Associations #31

Open
devyani9999 opened this issue Aug 1, 2017 · 0 comments
Open

How to use Associations #31

devyani9999 opened this issue Aug 1, 2017 · 0 comments

Comments

@devyani9999
Copy link

devyani9999 commented Aug 1, 2017

Hi,
I am trying to use associations with table-less models. I do not find how to use associations in github documentation nor I am able to find any tutorial regarding it.
Suppose, I am using belongs_to relationship(like User belongs_to a Category). How I am supposed to get Category.all or find a category object given a category_id. Do I need to override all these methods?
If you have any working example or documentation for the same, please share.
For details, here is the stackoverflow question regarding the same.

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

No branches or pull requests

1 participant