Search code examples
ruby-on-railsruby-on-rails-3observer-pattern

rails user notifications for several models


I'm still learning rails but want to be sure I'm heading in the right direction. For several of my models I want to let a list of users know that updates have been made when a new record is created for example. I'd like to tie this to an email and in-app notification(doesn't need to be AJAX), next page refresh is fine.

I've been reading up on observers some and I think that's what I want but they seem somewhat controversial based on the blogs I've read. Services like Pusher seem to be overkill for my needs.

Would this be a good solution for this scenario? Also, can anyone point me to some example code that I could emulate?

Thanks!


Solution

  • Check out Rails Cast if you are trying to learn. Best free code base I have seen. Also check out this book another great learning tool. Agile Web Development with Rails (2nd edition).There might be some newer ones out but I have not checked.