Sha256: a5b6d53f7db31f3786a5d23421152e665ca498bb76d23939b4e699891f83b07d
Contents?: true
Size: 810 Bytes
Versions: 32
Compression:
Stored size: 810 Bytes
Contents
module Maestrano::Connector::Rails class Synchronization < ActiveRecord::Base #=================================== # Associations #=================================== belongs_to :organization validates :status, presence: true def is_running? self.status == 'RUNNING' end def is_error? self.status == 'ERROR' end def is_success? self.status == 'SUCCESS' end def self.create_running(organization) Synchronization.create(organization_id: organization.id, status: 'RUNNING') end def set_success self.update_attributes(status: 'SUCCESS') end def set_error(msg) self.update_attributes(status: 'ERROR', message: msg) end def set_partial self.update_attributes(partial: true) end end end
Version data entries
32 entries across 32 versions & 1 rubygems