Class: ReturnReason

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/return_reason.rb

Constant Summary

DEFECTIVE =
'Defective'
POOR_QUALITY =
'Poor Quality'
WRONG_ITEM =
'Wrong Item'
WRONG_SIZE =
'Wrong Size/Color'
ARRIVED_LATE =
'Arrived to late'
OTHER =
'Other'
REASONS =
[DEFECTIVE, POOR_QUALITY, WRONG_ITEM, WRONG_SIZE, ARRIVED_LATE, OTHER]

Class Method Summary (collapse)

Class Method Details

+ (Array[Array]) select_form

method to get all the return reasons for a RMA form

['Defective', 1], ['Dont like it', 2

... ]

Parameters:

  • (none)

Returns:

  • (Array[Array])


20
21
22
# File 'app/models/return_reason.rb', line 20

def self.select_form
  all.collect {|r| [r.label, r.id]}
end