Class: Comee::Core::StockTransferRequest
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Comee::Core::StockTransferRequest
- Defined in:
- app/models/comee/core/stock_transfer_request.rb
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
32 33 34 |
# File 'app/models/comee/core/stock_transfer_request.rb', line 32 def self.ransackable_associations(_auth_object = nil) %w[from initiated_by sales_order to] end |
.ransackable_attributes(_auth_object = nil) ⇒ Object
27 28 29 30 |
# File 'app/models/comee/core/stock_transfer_request.rb', line 27 def self.ransackable_attributes(_auth_object = nil) %w[created_at due_date from_id id id_value initiated_by_id reference_date reference_number remark sales_order_id status to_id updated_at] end |
Instance Method Details
#validate_due_date_is_after_reference_date ⇒ Object
21 22 23 24 25 |
# File 'app/models/comee/core/stock_transfer_request.rb', line 21 def validate_due_date_is_after_reference_date return if due_date > reference_date errors.add(:due_date, "must be after reference date") end |