Module: Handicraft::UjsHelper
- Defined in:
- lib/handicraft/ujs_helper.rb
Instance Method Summary collapse
-
#yield_authenticity_token ⇒ Object
Passes the authenticity token for use in javascript.
Instance Method Details
#yield_authenticity_token ⇒ Object
Passes the authenticity token for use in javascript
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/handicraft/ujs_helper.rb', line 5 def yield_authenticity_token if protect_against_forgery? "<script type='text/javascript'> //<![CDATA[ window._auth_token_name = '#{request_forgery_protection_token}'; window._auth_token = '#{form_authenticity_token}'; //]]> </script>" end end |