Hello, I currently have my app''s mail setup as follows:
Step 1:
Observers monitor tables, and send out emails when triggered by
after_save in the observer
Step 2:
The observer then calls something like:
`UserMailer.XXXXXX_created_notification(record).deliver`
Step 3:
User mailer sends the mail out:
def XXXXXX_created_notification(record)
@record = record
mail(:to => "#{record.email}", :reply_to => "Reply
to
XXXXX", :subject => "XXXXX Notification")
end
My question to rails experts out there is, I want to provide users the
ability to turn on/off certain site wide notifications. Where is the
best place in Rails to bake this in? In the user_mailer.rb file
wrapped inside the def above? Or in the observer?
Suggestions?
Thanks
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.