routing - How to generate a "complex" url from a Mailer in Rails? -


i want generate specific url in mailer. like:

"http://localhost/teams/1/confirmation/123abc" 

where 1 = id of team , 123abc = confirmation token.

and since documentation tells me can't urls context, neither mailer nor mailer view, , don't want set precise string in mailer, i'd use variables, i've used method urlfor, can route this:

url_for(:host => default_url_options[:host],                :port => default_url_options[:port],                :controller => :teams,                :action => :confirmation,                :only_path => false,                :team => team.id,                :token => token.to_s)  # , generates this: "http://localhost/teams/confirmation?team=1&token=123abc" 

how use method urlfor generate link need to?


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -