I'm using devise, which works fine, now I try to use devise_invitable. I installed it correctly, but I'm getting the error when I try to access
http://localhost:3000/users/invitation/new
The error is:
Started GET "/users/invitation/new" for 127.0.0.1 at 2011-07-06 20:47:07 -0300 ActionController::RoutingError (uninitialized constant Users):
Rendered /Users/Fernando/.rvm/gems/ruby-1.9.2-head/gems/actionpack-3.0.7/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.9ms)
The routes looks like ok, and I don't know why it return this error.
Routes:
accept_user_invitation
GET /users/invitation/accept(.:format)
{:action=>"edit", :controller=>"devise/invitations"}
user_invitation
POST /users/invitation(.:format)
{:action=>"create", :controller=>"devise/invitations"}
new_user_invitation
GET /users/invitation/new(.:format)
{:action=>"new", :controller=>"devise/invitations"}
Actually, you must stick your invitations controller within a users
directory under app/controllers
for this to work.
So you would end up with:
/app/controllers/users/invitations_controller.rb
Doing this will get rid of that unitialized constant
error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With