Class: Amount
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Amount
- Includes:
- Operations
- Defined in:
- lib/amountable/amount.rb
Overview
Copyright 2015-2016, Instacart
Defined Under Namespace
Modules: Operations
Instance Attribute Summary collapse
-
#persistable ⇒ Object
Returns the value of attribute persistable.
Instance Method Summary collapse
Methods included from Operations
Instance Attribute Details
#persistable ⇒ Object
Returns the value of attribute persistable.
12 13 14 |
# File 'lib/amountable/amount.rb', line 12 def persistable @persistable end |
Instance Method Details
#save ⇒ Object
14 15 16 17 |
# File 'lib/amountable/amount.rb', line 14 def save raise StandardError.new("Can't persist amount to database") if persistable == false super end |