Class: Spree::Carton
- Inherits:
-
Base
- Object
- ActiveRecord::Base
- Base
- Spree::Carton
show all
- Defined in:
- app/models/spree/carton.rb
Instance Method Summary
collapse
Methods inherited from Base
display_includes
#generate_permalink, #save_permalink
Instance Method Details
#any_exchanges? ⇒ Boolean
56
57
58
|
# File 'app/models/spree/carton.rb', line 56
def any_exchanges?
inventory_units.any?(&:original_return_item)
end
|
#display_shipped_at ⇒ Object
44
45
46
|
# File 'app/models/spree/carton.rb', line 44
def display_shipped_at
shipped_at.to_fs(:rfc822)
end
|
#manifest_for_order(order) ⇒ Object
#order_emails ⇒ Object
36
37
38
|
# File 'app/models/spree/carton.rb', line 36
def order_emails
orders.map(&:email).uniq
end
|
#order_numbers ⇒ Object
32
33
34
|
# File 'app/models/spree/carton.rb', line 32
def order_numbers
orders.map(&:number)
end
|
#shipment_numbers ⇒ Object
40
41
42
|
# File 'app/models/spree/carton.rb', line 40
def shipment_numbers
shipments.map(&:number)
end
|
#to_param ⇒ Object
24
25
26
|
# File 'app/models/spree/carton.rb', line 24
def to_param
number
end
|
#tracking_url ⇒ Object
28
29
30
|
# File 'app/models/spree/carton.rb', line 28
def tracking_url
@tracking_url ||= shipping_method.build_tracking_url(tracking)
end
|