Class: Smithy::Liquid::Tags::Csrf::Param
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Smithy::Liquid::Tags::Csrf::Param
- Defined in:
- lib/smithy/liquid/tags/csrf.rb
Instance Method Summary collapse
Instance Method Details
#render(context) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/smithy/liquid/tags/csrf.rb', line 7 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 |