Class: Pageflow::ThemeCustomization
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Pageflow::ThemeCustomization
- Defined in:
- app/models/pageflow/theme_customization.rb
Overview
Override theme options and upload theme files for an entry type on a per account basis.
Instance Method Summary collapse
- #entry_type ⇒ Object private
-
#overrides ⇒ Hash<Symbol, Object>
Options that were passed to [ThemeCustomizations#update].
-
#selected_files ⇒ Hash<Symbol, ThemeCustomizationFile>
Theme customization files that have been assigned a role via [ThemeCustomizations#update].
Instance Method Details
#entry_type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'app/models/pageflow/theme_customization.rb', line 32 def entry_type Pageflow.config.entry_types.find_by_name!(entry_type_name) end |
#overrides ⇒ Hash<Symbol, Object>
Options that were passed to [ThemeCustomizations#update].
17 18 19 |
# File 'app/models/pageflow/theme_customization.rb', line 17 def overrides super&.deep_symbolize_keys || {} end |
#selected_files ⇒ Hash<Symbol, ThemeCustomizationFile>
Theme customization files that have been assigned a role via [ThemeCustomizations#update].
25 26 27 28 29 |
# File 'app/models/pageflow/theme_customization.rb', line 25 def selected_files selected_file_ids.compact.transform_values do |id| selected_files_by_id[id] end end |