X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/dc635b6d39be19a09a428282b6d639d029908df6..22f84a3ea8bc39eb4cb91575d35dfca683336032:/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier.rb diff --git a/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier.rb b/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier.rb new file mode 100644 index 0000000..df52af8 --- /dev/null +++ b/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier.rb @@ -0,0 +1,22 @@ +class <%= class_name %>Notifier < ActionMailer::Base + def signup_notification(<%= file_name %>) + setup_email(<%= file_name %>) + @subject += 'Please activate your new account' + @body[:url] = "http://YOURSITE/account/activate/#{<%= file_name %>.activation_code}" + end + + def activation(<%= file_name %>) + setup_email(<%= file_name %>) + @subject += 'Your account has been activated!' + @body[:url] = "http://YOURSITE/" + end + + protected + def setup_email(<%= file_name %>) + @recipients = "#{<%= file_name %>.email}" + @from = "ADMINEMAIL" + @subject = "[YOURSITE] " + @sent_on = Time.now + @body[:<%= file_name %>] = <%= file_name %> + end +end