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

Integrations Achemy -> Solidus | Devise | Base controller #10

Closed
oniram88 opened this issue Aug 11, 2016 · 5 comments
Closed

Integrations Achemy -> Solidus | Devise | Base controller #10

oniram88 opened this issue Aug 11, 2016 · 5 comments

Comments

@oniram88
Copy link
Contributor

This won't be an issue...it's more a suggestion to insert as Faq in wiki.
If you use gem 'solidus_auth_devise' and will you login in the frontend interface with alchemy helpers used in the layout, you must make a change in devise configurations and set the correct parent_controller:

Devise.setup do |config|
    config.parent_controller = "Spree::BaseController"
end

That because the default parent_controller is ApplicationController and we attach all our alchemy helpers in the Spree::BaseController in the /lib/alchemy/solidus/alchemy_in_solidus.rb file.

@tvdeyen
Copy link
Member

tvdeyen commented Aug 15, 2016

👍 IMO we should add this to alchemy_in_solidus.rb or at least mention it in the README. Would you open a PR? Thanks for reporting

@oniram88
Copy link
Contributor Author

But you say it's better to make a comment in the readme file and let the developer attach this or it's better to add an initilizer in the engine and check if it's the case to set the parent controller...
for me it's better to let the developer take the decision of what it's better for him.

@tvdeyen
Copy link
Member

tvdeyen commented Aug 15, 2016

Absolutely. The decision the developer makes is which file she includes, right? So, IMO we should add this into the alchemy_in_solidus.rb file.

We want to make the integration as transparent, but in the same time, as easy as possible for developers. Since the Devise base controller is mandatory we should make this automatically happen, if the developer made he decision what kind of integration she wants. Alchemy in Solidus or Solidus in Alchemy.

WDTY?

@oniram88
Copy link
Contributor Author

oniram88 commented Sep 5, 2016

Take a look at the PR #12

@tvdeyen
Copy link
Member

tvdeyen commented Sep 7, 2016

Great! Thanks

@tvdeyen tvdeyen closed this as completed Sep 7, 2016
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