In my application, I am working to allow users to send invitations. Invitations have tokens. And in the letters, I link to the registration page with a token in transit. In the mail controller, I use:
new_user_registration_url(@invitation.token)
as I saw Ryan Bates in this railscast . But it outputs this format:
http:
Why there is a "." instead of "/"?
Update:
I am using the program, and here are the relevant routes. I am not so sure about this; I struggled a bit with this, but they seemed to work:
devise_scope :user do
get '/signup/:invitation_token' => "registrations#new", :as => :new_user_registration
end
devise_for :users, :controllers => { :registrations => "registrations"}, :skip => [:registrations]
as :user do
get '/users/cancel' => 'devise/registrations#cancel', :as => :cancel_user_registration
post '/users' => 'devise/registrations#create', :as => :user_registration
get '/signup' => 'registrations#new', :as => :new_user_registration
get '/users/edit' => 'devise/registrations#edit', :as => :edit_user_registration
put '/users' => 'devise/registrations#update'
delete '/users' => 'devise/registrations#destroy'
end
source
share