Closed liquidtrends closed 9 years ago
Looks like your app doesn't have a role set for the current_user. The role corresponds to the plan selected by the user. Check to see if the plan is set.
Thanks. Can you expand on this? I went through the code and didn't see anything that would be missing...
I suggest cloning the reference implementation from the repo and comparing with what you have.
AFAIR, in order to fix this error I had to do either rake db:migrate
or rake db:seed
per README section Set the Database.
There is a new version of this application for Rails 4.2 using the Payola gem.
I am at the point of the tutorial where I integrate the JS with stripe. I have tested the signup and the console messages pass for me.
When I move forward with "Add JavaScript for Form Processing" and register a new user, I am presented with the following error after hitting the submit button:
NoMethodError at /users/sign_in undefined method `name' for nil:NilClass
after_sign_in_path_for app/controllers/application_controller.rb, line 9
4 rescue_from CanCan::AccessDenied do |exception| 5 redirect_to root_path, :alert => exception.message 6 end 7 8 def after_sign_in_path_for(resource) 9 case current_user.roles.first.name 10 when 'admin' 11 users_path 12 when 'silver' 13 content_silver_path 14 when 'gold'