Class: Lesmok::Tags::Csrf
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Lesmok::Tags::Csrf
- Defined in:
- lib/lesmok/tags.rb
Instance Method Summary collapse
Instance Method Details
#render(context) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/lesmok/tags.rb', line 42 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 |