Class: Shipment

Inherits:
ActiveRecord::Base show all
Defined in:
app/models/shipment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#notify_customerObject

Returns the value of attribute notify_customer.



3
4
5
# File 'app/models/shipment.rb', line 3

def notify_customer
  @notify_customer
end

Instance Method Details

#tracking_urlObject



10
11
12
13
14
15
16
17
# File 'app/models/shipment.rb', line 10

def tracking_url
  case shipment_carrier.permalink
  when 'fedex'
    "http://www.fedex.com/Tracking?tracknumbers=#{tracking_number}"
  else
    "https://www.google.com/search?q=#{tracking_number}"
  end
end