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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to