Skip to content

Instantly share code, notes, and snippets.

@erubboli
Created August 29, 2010 13:20
Show Gist options
  • Save erubboli/556276 to your computer and use it in GitHub Desktop.
Save erubboli/556276 to your computer and use it in GitHub Desktop.
class Currency < ActiveRecord::Base
end
class CurrencyObserver < ActiveRecord::Observer
observe :currency
def after_update(currency)
puts "new rate for #{currency.symbol} : #{currency.rate}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment