Class: Tiler::Panel
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Tiler::Panel
- Defined in:
- app/models/tiler/panel.rb
Instance Method Summary collapse
-
#col_span ⇒ Object
Backwards-compat alias for templates that still call col_span.
- #data ⇒ Object
- #parsed_config ⇒ Object
- #widget ⇒ Object
- #widget_label ⇒ Object
Instance Method Details
#col_span ⇒ Object
Backwards-compat alias for templates that still call col_span.
52 53 54 |
# File 'app/models/tiler/panel.rb', line 52 def col_span width end |
#data ⇒ Object
47 48 49 |
# File 'app/models/tiler/panel.rb', line 47 def data .data end |
#parsed_config ⇒ Object
33 34 35 36 37 |
# File 'app/models/tiler/panel.rb', line 33 def parsed_config JSON.parse(config.presence || "{}") rescue JSON::ParserError {} end |
#widget ⇒ Object
39 40 41 |
# File 'app/models/tiler/panel.rb', line 39 def Tiler..fetch().new(self) end |
#widget_label ⇒ Object
43 44 45 |
# File 'app/models/tiler/panel.rb', line 43 def Tiler.[]&.label || .to_s.humanize end |