Class: Locomotive::Liquid::Tags::Csrf::Param
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Locomotive::Liquid::Tags::Csrf::Param
- Defined in:
- lib/locomotive/liquid/tags/csrf.rb
Instance Method Summary collapse
Instance Method Details
#render(context) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/locomotive/liquid/tags/csrf.rb', line 8 def render(context) controller = context.registers[:controller] name = controller.send(:request_forgery_protection_token).to_s value = controller.send(:form_authenticity_token) %(<input type="hidden" name="#{name}" value="#{value}">) end |