I need to send an email notification when the price of the product changes. Is it possible to do this with help ActiveRecord::Observeror do I need to use the programming logic in the edit form?
ActiveRecord::Observer
You can use Dirty Objects to achieve this, in this particular case you will have something similar in your observer.
FooMailer.deliver_alert(foo) if foo.price_changed?
: " ". save prince_changed?.
save
prince_changed?
, .
Source: https://habr.com/ru/post/1755788/More articles:Android ListActivity row color based on object state - javaWhy Linq to Nhibernate creates an outer join - oracle9ijquery get form values, multiple forms - jqueryI need help separating addresses (number, addition, etc.) - stringCFDOCUMENT ignores font color if false false false - coldfusionJQuery tablesorter plugin - perform AFTER table sorting - jqueryHow to write ruby code in css file - ruby-on-railsОбновление до универсального приложения iPhone/iPad не совсем работает - iphoneHow to check which method implementation is faster - optimizationCreating a scss variable in config.rb for scss files - ruby | fooobar.comAll Articles