Class: Pageflow::Countastic::WidgetType

Inherits:
WidgetType
  • Object
show all
Defined in:
lib/pageflow/countastic/widget_type.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



6
7
8
# File 'lib/pageflow/countastic/widget_type.rb', line 6

def name
  'pageflow_countastic'
end

#render(template, entry) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/pageflow/countastic/widget_type.rb', line 14

def render(template, entry)
  template.render(
    partial: "pageflow/countastic/widget",
    locals: {
      entry: entry
    }
  )
end

#render_head_fragment(template, entry) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/pageflow/countastic/widget_type.rb', line 23

def render_head_fragment(template, entry)
  template.render(
    partial: 'pageflow/countastic/head',
    locals: {
      entry: entry
    }
  )
end

#rolesObject



10
11
12
# File 'lib/pageflow/countastic/widget_type.rb', line 10

def roles
  ['countastic']
end