Class: Appearance
Constant Summary
collapse
- ALLOWED_PWA_ICON_SCALER_WIDTHS =
[192, 512].freeze
Constants included
from WithUploads
WithUploads::FILE_UPLOADERS
CacheMarkdownField::INVALIDATED_BY
ApplicationRecord::MAX_PLUCK
ResetOnUnionError::MAX_RESET_PERIOD
Instance Attribute Summary
#skip_markdown_cache_validation
Class Method Summary
collapse
Instance Method Summary
collapse
#retrieve_upload
#perform_fast_destroy
#run_after_commit, #run_after_commit_or_now
#attribute_invalidated?, #banzai_render_context, #cached_html_for, #cached_html_up_to_date?, #can_cache_field?, #invalidated_markdown_cache?, #latest_cached_markdown_version, #local_version, #mentionable_attributes_changed?, #mentioned_filtered_user_ids_for, #parent_user, #refresh_markdown_cache, #refresh_markdown_cache!, #rendered_field_content, #skip_project_check?, #store_mentions!, #updated_cached_html_for
#cache!
cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
#serializable_hash
Class Method Details
.current_without_cache ⇒ Object
Overrides CacheableAttributes.current_without_cache
65
66
67
|
# File 'app/models/appearance.rb', line 65
def self.current_without_cache
first
end
|
Instance Method Details
#favicon_path ⇒ Object
93
94
95
|
# File 'app/models/appearance.rb', line 93
def favicon_path
logo_system_path(favicon, 'favicon')
end
|
89
90
91
|
# File 'app/models/appearance.rb', line 89
def
logo_system_path(, 'header_logo')
end
|
#logo_path ⇒ Object
81
82
83
|
# File 'app/models/appearance.rb', line 81
def logo_path
logo_system_path(logo, 'logo')
end
|
#pwa_icon_path ⇒ Object
85
86
87
|
# File 'app/models/appearance.rb', line 85
def pwa_icon_path
logo_system_path(pwa_icon, 'pwa_icon')
end
|
#pwa_icon_path_scaled(width) ⇒ Object
75
76
77
78
79
|
# File 'app/models/appearance.rb', line 75
def pwa_icon_path_scaled(width)
return unless pwa_icon_path.present?
pwa_icon_path + "?width=#{width}"
end
|
101
102
103
|
# File 'app/models/appearance.rb', line 101
def
.present?
end
|
97
98
99
|
# File 'app/models/appearance.rb', line 97
def
.present?
end
|
#single_appearance_row ⇒ Object
69
70
71
72
73
|
# File 'app/models/appearance.rb', line 69
def single_appearance_row
if self.class.any?
errors.add(:base, _('Only 1 appearances row can exist'))
end
end
|