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

Modernize implementation: use schema_monkey and schema_plus_core #16

Open
ronen opened this issue Mar 6, 2016 · 1 comment
Open

Modernize implementation: use schema_monkey and schema_plus_core #16

ronen opened this issue Mar 6, 2016 · 1 comment

Comments

@ronen
Copy link
Member

ronen commented Mar 6, 2016

schema_associations currently monkey-patches ActiveRecord::Base, using a bunch of alias_method_chain calls.

Instead, ideally schema_plus_core would provide a middleware stack for the relevant methods (reflect_on_association and friends), and schema_associations would then be middleware.

ronen added a commit that referenced this issue Mar 6, 2016
This eliminates the various alias_method_chains, and the railtie.

Addresses #16
@ronen
Copy link
Member Author

ronen commented Mar 6, 2016

I've partly done this. Schema_associations now uses schema_monkey rather than manually patching, and the alias_method_chain calls are now replaced with method overrides and super.

Still WBN to add the appropriate middleware stacks to schema_plus_core and replace the method overrides with middleware. So keeping this issue open for now.

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