Problem
I'm using devise
and devise_invitable
gems on a project management web app. I am successfully inviting new users to to the web app.
But what I need is to invite new users to a specific project and can't figure out how to do that. I need the project ID as part of the route so I can properly wire up the controller code.
Context
Relevant routes.rb
section looks like:
devise_for :users, :controllers => { :invitations => "invitations" }
So:
users/invitation/new
works for new invitations.- My own
invitations_controller.rb
overrides defaultInvitationsController
I have
:projects
as a resource that I'm using, e.g.resources :projects do resources :milestones, :task ... etc end
(I think) I am looking to make something like this work:
users/invitation/projects/4f3423d34323/new