app/models/iro/alert.rb in iron_warbler-2.0.7.16 vs app/models/iro/alert.rb in iron_warbler-2.0.7.17

- old
+ new

@@ -35,16 +35,16 @@ def do_run alert = self begin price = Tda::Stock.get_quote( alert.symbol ).last - if alert.direction == self.class::DIRECTION_ABOVE && price >= alert.strike || - alert.direction == self.class::DIRECTION_BELOW && price <= alert.strike + if alert.direction == alert.class::DIRECTION_ABOVE && price >= alert.strike || + alert.direction == alert.class::DIRECTION_BELOW && price <= alert.strike Iro::AlertMailer.stock_alert( alert.id.to_s ).deliver_later - alert.update({ status: self.class::STATUS_INACTIVE }) + alert.update({ status: alert.class::STATUS_INACTIVE }) print '^' end rescue => err puts! err, 'err'