Methods
- B
- C
- F
- I
Class Public methods
build_default(options = {}) Link
Source: show
# File app/models/db/theme.rb, line 10 def build_default(options = {}) new(defaults.deep_merge(options)) end
ignored_attributes() Link
Source: show
# File app/models/db/theme.rb, line 6 def ignored_attributes %w[id site_id] end
Instance Public methods
custom_styles() Link
We only store those elements that are different from the default style, so to distinguish items that have been custom styled we simply have to remove the null columns
Source: show
# File app/models/db/theme.rb, line 52 def custom_styles attributes.compact.without(self.class.ignored_attributes) end
custom_styling() Link
Also aliased as: custom_styles_by_element
Source: show
# File app/models/db/theme.rb, line 34 def custom_styling result = {} custom_styles.each do |key, value| element, property = key.split("__") result[element] ||= {} result[element][property] = value end result.with_indifferent_access end