app/models/snip_snap_zap/snip_snap.rb
# See if the stoppable attributes have been met
See if the stoppable attributes have been met
See if the stoppable attributes have been met
def check_for_stop
        return unless snap_schedule.stoppable_attributes.present?
        puts snap_schedule.stoppable_attributes.first.stringify_keys.inspect
        puts self.snapable.attributes.slice(*snap_schedule.stoppable_attributes.first.stringify_keys.keys).inspect
        if snap_schedule.stoppable_attributes.first.stringify_keys == self.snapable.attributes.slice(*snap_schedule.stoppable_attributes.first.stringify_keys.keys)
          self.snap_schedule.update_column(:active, false)
        end
      end
def check_for_stop return unless snap_schedule . stoppable_attributes . present? puts snap_schedule . stoppable_attributes . first . stringify_keys . inspect puts self . snapable . attributes . slice ( * snap_schedule . stoppable_attributes . first . stringify_keys . keys ) . inspect if snap_schedule . stoppable_attributes . first . stringify_keys == self . snapable . attributes . slice ( * snap_schedule . stoppable_attributes . first . stringify_keys . keys ) self . snap_schedule . update_column ( :active , false ) end end
See if the stoppable attributes have been met
See if the stoppable attributes have been met