Class: ReturnItem::EligibilityValidator::RMARequired

Inherits:
Spree::ReturnItem::EligibilityValidator::BaseValidator
  • Object
show all
Defined in:
app/models/spree/return_item/eligibility_validator/rma_required.rb

Instance Method Summary collapse

Instance Method Details

#eligible_for_return?Boolean

Returns:

  • (Boolean)

3
4
5
6
7
8
9
10
# File 'app/models/spree/return_item/eligibility_validator/rma_required.rb', line 3

def eligible_for_return?
  if @return_item.return_authorization.present?
    return true
  else
    add_error(:rma_required, Spree.t('return_item_rma_ineligible'))
    return false
  end
end

#requires_manual_intervention?Boolean

Returns:

  • (Boolean)

12
13
14
# File 'app/models/spree/return_item/eligibility_validator/rma_required.rb', line 12

def requires_manual_intervention?
  false
end