Class: Banner
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Banner
- Includes:
- IdentityCache
- Defined in:
- app/models/banner.rb
Overview
typed: ignore frozen_string_literal: true
Constant Summary collapse
- VALID_LOCATIONS =
{ promotions_page_1: 'Promotions page above restaurant tag group', home_page: 'Home page as search form background', }.freeze
Instance Method Summary collapse
Methods inherited from ApplicationRecord
Instance Method Details
#fix_attributes ⇒ Object
55 56 57 58 59 60 61 62 63 |
# File 'app/models/banner.rb', line 55 def fix_attributes if restaurant_tag_group_id.present? self.active = true self.locales = MyLocaleManager.available_locales self.order_number = 1 end true end |