Class: Track
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Track
- Defined in:
- app/models/track.rb
Instance Method Summary collapse
Instance Method Details
#combine_city_and_state ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/models/track.rb', line 20 def combine_city_and_state if location.blank? self.location = if city.blank? && state.blank? # city and state can be blank for events like # 'Shipment information sent to FedEx' "None" else [city,state].delete_if{|a|a.blank?}.join(', ') end end end |