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
Namespaced User Model (Spree)... #79
Comments
Sounds like our user helpers are choking on the module part of your user class. Are you using spree_auth_devise? If so, we can probably make a quick change tomorrow to make it use |
Yes, I'm using the I appreciate the help. Thanks again! |
Good deal. We'll take a closer look tmrw, but I think it should be a relatively easy fix. Thanks for using Storytime! |
Hope to be using it real soon! 👍 |
I pushed out Storytime v1.2.0 which should fix the issues that you experienced when trying to get this running with Spree. I ended up creating a Spree app using both the A couple of changes are needed on your end:
config/initializers/storytime.rb # Path used to sign users in.
config.login_path = '/user/spree_user/sign_in'
# Path used to log users out.
config.logout_path = '/user/spree_user/logout'
# Method used for Storytime user logout path.
config.logout_method = :get Also, I had to create a decorator to add app/decorators/models/spree/user_decorator.rb Spree::User.class_eval do
storytime_user
end Let us know if you run into any issues or if this works out for you. |
Thanks, I've been playing with the updated code without too many issues. I had already setup the Did you mount Spree under a different path or did you keep it mounting I was thinking I may have to place Spree within a My Rails.application.routes.draw do
mount Spree::Core::Engine, at: '/shop/'
mount Storytime::Engine, at: '/' I'm seeing an issue with Spree not keeping its links under the Will post the bug report with the Spree team. Thanks so much for making the changes to make Storytime play well with Spree! |
I tried changing my Glad the changes worked for you. |
I'm trying to integrate StoryTime into an existing Spree e-commerce app and am getting the following errors:
When visiting
http://myapp/storytime
:When visiting
http://myapp/
:I believe this has to do with the fact that I'm using a namespaced user model (Spree::User) in the
config/initializers/storytime.rb
file:Any ideas on how to fix this?
Thanks so much!
The text was updated successfully, but these errors were encountered: