Skip to content

Commit

Permalink
Add reset_password and accept_invitation new routes
Browse files Browse the repository at this point in the history
  • Loading branch information
iox committed Oct 15, 2012
1 parent 4a468fc commit e90f0bb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Expand Up @@ -45,6 +45,8 @@ def add_routes
return unless options[:add_routes]
route "match 'search' => '#{file_path}#search', :as => 'site_search'"
route "match '#{options[:user_resource_name]}s/:id/activate_from_email/:key' => '#{options[:user_resource_name]}s#activate', :as => 'activate_from_email'"
route "match '#{options[:user_resource_name]}s/:id/accept_invitation_from_email/:key' => '#{options[:user_resource_name]}s#accept_invitation', :as => 'accept_invitation_from_email'"
route "match '#{options[:user_resource_name]}s/:id/reset_password_from_email/:key' => '#{options[:user_resource_name]}s#reset_password', :as => 'reset_password_from_email'"
if class_path.empty?
route "root :to => '#{file_path}#index'"
route "match ENV['RAILS_RELATIVE_URL_ROOT'] => 'front#index' if ENV['RAILS_RELATIVE_URL_ROOT']"
Expand Down
Expand Up @@ -3,7 +3,7 @@
If you have forgotten your password for <%%= @app_name %>, you can choose
a new one by clicking on this link:

<%%= reset_password_<%= name.underscore -%>_url :id => @<%= name.underscore -%>, :key => @key %>
<%%= reset_password_from_email_url :id => @<%= name.underscore -%>, :key => @key %>

Thank you,

Expand Down
2 changes: 1 addition & 1 deletion hobo/lib/generators/hobo/user_mailer/templates/invite.erb
Expand Up @@ -2,7 +2,7 @@

You have been invited to join <%%= @app_name %>. If you wish to accept, please click on the following link

<%%= accept_invitation_<%= name.underscore %>_url :id => @<%= name.underscore %>, :key => @key %>
<%%= accept_invitation_from_email_url :id => @<%= name.underscore %>, :key => @key %>

Thank you,

Expand Down

0 comments on commit e90f0bb

Please sign in to comment.