Class: CsrfMetaTags
- Inherits:
-
Adminsite::LiquidTag
- Object
- Liquid::Tag
- Adminsite::LiquidTag
- CsrfMetaTags
- Includes:
- ActionView::Helpers::CsrfHelper, ActionView::Helpers::FormTagHelper
- Defined in:
- lib/adminsite/liquid/tags/asset.rb
Instance Method Summary collapse
- #form_authenticity_token ⇒ Object
- #protect_against_forgery? ⇒ Boolean
- #render(context) ⇒ Object
- #request_forgery_protection_token ⇒ Object
Instance Method Details
#form_authenticity_token ⇒ Object
39 40 41 |
# File 'lib/adminsite/liquid/tags/asset.rb', line 39 def form_authenticity_token @environment['authenticity_token'] end |
#protect_against_forgery? ⇒ Boolean
35 36 37 |
# File 'lib/adminsite/liquid/tags/asset.rb', line 35 def protect_against_forgery? true end |
#render(context) ⇒ Object
30 31 32 33 |
# File 'lib/adminsite/liquid/tags/asset.rb', line 30 def render(context) @environment = context.environments.first end |
#request_forgery_protection_token ⇒ Object
43 44 45 |
# File 'lib/adminsite/liquid/tags/asset.rb', line 43 def request_forgery_protection_token @environment['authenticity_param'] end |