Class: Cats::Core::Transaction
Constant Summary
collapse
- DRAFT =
"Draft".freeze
- COMMITTED =
"Committed".freeze
- STATUSES =
[DRAFT, COMMITTED].freeze
Instance Method Summary
collapse
Instance Method Details
#commit ⇒ Object
20
21
22
|
# File 'app/models/cats/core/transaction.rb', line 20
def commit
raise(NotImplementedError, "Method should be implemented in child classes.")
end
|
#set_status ⇒ Object
24
25
26
27
28
|
# File 'app/models/cats/core/transaction.rb', line 24
def set_status
return unless new_record?
self.status = DRAFT
end
|