0

I have a Stock model that has the following callback:

after_save :update_port_stock_current_price

But I only want that executed if the Stock object being saved had the price changed.

How do I detect if a specific attribute, i.e. stock.price has changed in this save?

marcamillion
  • 32,933
  • 55
  • 189
  • 380

0 Answers0