lib/generators/hobo/user_mailer/templates/mailer.rb.erb in hobo-1.3.0.pre24 vs lib/generators/hobo/user_mailer/templates/mailer.rb.erb in hobo-1.3.0.pre25

- old
+ new

@@ -1,25 +1,25 @@ class <%= class_name -%>Mailer < ActionMailer::Base default :from => "no-reply@#{host}" - def forgot_password(user, key) - @user, @key = user, key + def forgot_password(<%= name.underscore %>, key) + @<%= name.underscore %>, @key = <%= name.underscore %>, key mail( :subject => "#{app_name} -- forgotten password", - :to => user.email_address ) + :to => <%= name.underscore %>.email_address ) end <% if invite_only? -%> - def invite(user, key) - @user, @key = user, key + def invite(<%= name.underscore %>, key) + @<%= name.underscore %>, @key = <%= name.underscore %>, key mail( :subject => "Invitation to #{app_name}", - :to => user.email_address ) + :to => <%= name.underscore %>.email_address ) end <% elsif options[:activation_email] %> - def activation(user, key) - @user, @key = user, key - mail :subject => "#{app_name} -- activate", - :to => user.email_address + def activation(<%= name.underscore %>, key) + @<%= name.underscore %>, @key = <%= name.underscore %>, key + mail( :subject => "#{app_name} -- activate", + :to => <%= name.underscore %>.email_address ) end <% end -%> end