Class: CustomLabel
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- CustomLabel
- Includes:
- IdentityCache
- Defined in:
- app/models/custom_label.rb
Overview
CustomLabel is used in 3 subclasses : HhPackage::RestaurantPackage, PackageMenu, and all package types
The defined_label attribute serves as a marker that indicates whether the record was created by the system, not by the user, so the user should not be able to delete it
Constant Summary collapse
- DEFINED_LABELS =
[:comemore_payless, :require_prepayment, :require_preauthorization, :free_cancellation, :accept_we_travel_together, :x_reservation_duration, :x_party_size, :x_km_delivery_free, :x_course, :x_dishes, :require_deposit, :extra_benefit, :exclusive].freeze
Instance Method Summary collapse
Methods inherited from ApplicationRecord
Instance Method Details
#clear_package_attrs ⇒ Object
54 55 56 |
# File 'app/models/custom_label.rb', line 54 def clear_package_attrs package_attrs.map(&:package).map(&:restaurant_packages).flatten.map(&:touch) end |