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

replace associations mechanism #51

Open
lanej opened this issue May 26, 2016 · 1 comment
Open

replace associations mechanism #51

lanej opened this issue May 26, 2016 · 1 comment

Comments

@lanej
Copy link
Owner

lanej commented May 26, 2016

is currently very clunky.

Instead of modeling associations as instance variables, they could simply be referred do as attributes. There would be a belongs_to and a has_many.

  • has_many: would likely require a block form argument yielding a scoped collection that would be stored in the attribute.
  • belongs_to: should be a simple as declaring the class and making cistern do the leg work.

Side effects:

  • aping objects would also print nested objects within. This would also force load any association not already loaded.
  • sideloading would become feasible from the model api.
@lanej
Copy link
Owner Author

lanej commented Aug 4, 2016

cistern support for associations is available in 2.6

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