Module: Conjoin::Csrf
- Defined in:
- lib/conjoin/csrf.rb
Instance Method Summary collapse
-
#csrf_tag ⇒ Object
Public: Sugar to include a csrf tag.
-
#csrf_token ⇒ Object
Public: Sugar to access the csrf token.
Instance Method Details
#csrf_tag ⇒ Object
Public: Sugar to include a csrf tag
Examples:
<form action="/new">
<%= csrf_tag %>
<input type="text" />
</form>
13 14 15 |
# File 'lib/conjoin/csrf.rb', line 13 def csrf_tag Rack::Csrf.tag(env) end |
#csrf_token ⇒ Object
Public: Sugar to access the csrf token
Examples:
<%= csrf_token %>
22 23 24 |
# File 'lib/conjoin/csrf.rb', line 22 def csrf_token Rack::Csrf.token(env) end |