Class: Locomotive::Steam::Liquid::Tags::Csrf::Base

Inherits:
Liquid::Tag
  • Object
show all
Defined in:
lib/locomotive/steam/liquid/tags/csrf.rb

Direct Known Subclasses

Meta, Param

Instance Method Summary collapse

Instance Method Details

#render(context) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/locomotive/steam/liquid/tags/csrf.rb', line 9

def render(context)
  service = context.registers[:services].csrf_protection

  if service.enabled?
    render_csrf(service)
  else
    ''
  end
end