X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/dc635b6d39be19a09a428282b6d639d029908df6..22f84a3ea8bc39eb4cb91575d35dfca683336032:/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/observer.rb diff --git a/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/observer.rb b/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/observer.rb new file mode 100644 index 0000000..6ade4f3 --- /dev/null +++ b/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/observer.rb @@ -0,0 +1,9 @@ +class <%= class_name %>Observer < ActiveRecord::Observer + def after_create(<%= file_name %>) + <%= class_name %>Notifier.deliver_signup_notification(<%= file_name %>) + end + + def after_save(<%= file_name %>) + <%= class_name %>Notifier.deliver_activation(<%= file_name %>) if <%= file_name %>.recently_activated? + end +end \ No newline at end of file