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

Make the wp-connector gem mountable #36

Open
cies opened this issue May 5, 2015 · 1 comment
Open

Make the wp-connector gem mountable #36

cies opened this issue May 5, 2015 · 1 comment

Comments

@cies
Copy link
Contributor

cies commented May 5, 2015

Therefor it needs to be namespaced and made into a Rails Engine (if it is not already).

In oder to map the WP_TYPE property to our models in Rails we can do a trick: find all classes that mix in WpCache and pull their mandatory ModelName::WP_TYPE property.

This way the WpConnectorController does no longer need to be made manually, but is supplied by the gem and merely needs to be mounted in the base app.

@tolgap this is what you meant right?

@tolgap
Copy link

tolgap commented May 9, 2015

@cies this is indeed what I meant.
It shouldn't be that big of a difference, and will make the usage of this gem much simpler by just mounting it in your routes.rb, if the WpConnectorController can be implemented in a dynamic way, as you suggested.

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

No branches or pull requests

2 participants