Class: Locomotive::Liquid::Tags::Csrf::Meta
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Locomotive::Liquid::Tags::Csrf::Meta
- Defined in:
- lib/locomotive/liquid/tags/csrf.rb
Instance Method Summary collapse
Instance Method Details
#render(context) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/locomotive/liquid/tags/csrf.rb', line 20 def render(context) controller = context.registers[:controller] name = controller.send(:request_forgery_protection_token).to_s value = controller.send(:form_authenticity_token) %{ <meta name="csrf-param" content="#{name}"> <meta name="csrf-token" content="#{value}"> } end |