Exception: SpreeCmCommissioner::ReservedBlocks::OnHoldByOtherGuestError
- Inherits:
-
StandardError
- Object
- StandardError
- SpreeCmCommissioner::ReservedBlocks::OnHoldByOtherGuestError
- Defined in:
- app/errors/spree_cm_commissioner/reserved_blocks/on_hold_by_other_guest_error.rb
Instance Attribute Summary collapse
-
#block_label ⇒ Object
readonly
Returns the value of attribute block_label.
Instance Method Summary collapse
-
#initialize(block_label = nil) ⇒ OnHoldByOtherGuestError
constructor
A new instance of OnHoldByOtherGuestError.
-
#message ⇒ Object
override.
Constructor Details
#initialize(block_label = nil) ⇒ OnHoldByOtherGuestError
Returns a new instance of OnHoldByOtherGuestError.
6 7 8 9 |
# File 'app/errors/spree_cm_commissioner/reserved_blocks/on_hold_by_other_guest_error.rb', line 6 def initialize(block_label = nil) @block_label = block_label super() end |
Instance Attribute Details
#block_label ⇒ Object (readonly)
Returns the value of attribute block_label.
4 5 6 |
# File 'app/errors/spree_cm_commissioner/reserved_blocks/on_hold_by_other_guest_error.rb', line 4 def block_label @block_label end |
Instance Method Details
#message ⇒ Object
override
12 13 14 15 16 17 18 |
# File 'app/errors/spree_cm_commissioner/reserved_blocks/on_hold_by_other_guest_error.rb', line 12 def if block_label.present? I18n.t('line_item.validation.blocks_are_on_hold_by_other_guest_with_label', label: block_label) else I18n.t('line_item.validation.blocks_are_on_hold_by_other_guest') end end |