Class: Comee::Core::CustomerOrder
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Comee::Core::CustomerOrder
- Defined in:
- app/models/comee/core/customer_order.rb
Constant Summary collapse
Class Method Summary collapse
- .ransackable_associations(_auth_object = nil) ⇒ Object
- .ransackable_attributes(_auth_object = nil) ⇒ Object
Instance Method Summary collapse
Class Method Details
.ransackable_associations(_auth_object = nil) ⇒ Object
42 43 44 |
# File 'app/models/comee/core/customer_order.rb', line 42 def self.ransackable_associations(_auth_object = nil) %w[client customer_order_items shipment_address] end |
.ransackable_attributes(_auth_object = nil) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'app/models/comee/core/customer_order.rb', line 27 def self.ransackable_attributes(_auth_object = nil) %w[ id client_id delivery_address invoice_address order_number status final_destination consignee consolidator_date shipping_date ] end |
Instance Method Details
#file_url ⇒ Object
46 47 48 |
# File 'app/models/comee/core/customer_order.rb', line 46 def file_url file.attached? ? Rails.application.routes.url_helpers.rails_blob_url(file, only_path: false) : nil end |