Sha256: 4f56bcf555e02c21358283dc0c2187315b41ab8b0ccffecc4cb690a171d0adaa
Contents?: true
Size: 447 Bytes
Versions: 23
Compression:
Stored size: 447 Bytes
Contents
module EnjuCirculation module EnjuWithdraw extend ActiveSupport::Concern included do before_save :withdraw!, on: :create end def withdraw! circulation_status = CirculationStatus.where(name: 'Removed').first item.update_column(:circulation_status_id, circulation_status.id) if circulation_status item.use_restriction = UseRestriction.where(name: 'Not For Loan').first item.index! end end end
Version data entries
23 entries across 23 versions & 1 rubygems