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

Module configuration via Alchemy configuration #52

Closed
robinboening opened this issue Sep 14, 2016 · 2 comments
Closed

Module configuration via Alchemy configuration #52

robinboening opened this issue Sep 14, 2016 · 2 comments

Comments

@robinboening
Copy link
Contributor

I pick up the discussion from #51 to continue the conversation in a separate thread.

Quoting myself:

As a feature suggestion: We could provide a alchemy/config.yml in alchemy-devise that only includes the devise modules and we read from that in the Alchemy::User class.

# Alchemy::User
DEVISE_MODULES = Alchemy::Config.get(:devise_modules)

Alchemy CMS would need to know that there is a config.yml - not sure if that would work...

Quoting @tvdeyen

That is a good idea (we had this once the user model was still in the core, remember?), but to achieve that there is more involved, because Alchemy does not support to add something to the config via an plugin.

We could add a app/config/alchemy/devise.yml, but then we need to duplicate all the configuration reading code from the core.

A solution could be to patch the core so it loads all app/config/alchemy/*.config.yml files and merges them together. So we could then have a app/config/alchemy/devise.config.yml file and use the configuration code from the core. (We can't just load all *.yml files in the app/config/alchemy folder, because the elements.yml and page_layouts.yml files also are in this folder.)

Or: Change the configuration file to app/config/alchemy.yml and then load all app/config/alchemy.*.yml files into the configuration. This would follow rails conventions, but is a bigger change for existing sites.

WDYT?

@tvdeyen
Copy link
Member

tvdeyen commented Sep 14, 2016

@robinboening thanks, but isn't this the wrong repo? ;)

This should be discussed on the core repo, no?

@robinboening
Copy link
Contributor Author

True... I'll move 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

No branches or pull requests

2 participants