Reputation: 65
I notice it's used primarily for sending emails. Let's say I want to send an email after every comment is created.
Is using Observers really necessary when you could just place the Mailer.deliver_email(user) in your comments_controller.rb's create action instead?
Upvotes: 1
Views: 161
Reputation: 10662
For proper programming practices, yes. The observers decouple the code and make sure it stays maintainable.
Upvotes: 3