Module: Waxx::Csrf
Overview
Waxx Copyright © 2016 ePark labs Inc. & Daniel J. Fitzpatrick <[email protected]> All rights reserved. Released under the Apache Version 2 License. See LICENSE.txt.
Instance Method Summary collapse
Instance Method Details
#ht(x) ⇒ Object
11 12 13 |
# File 'lib/waxx/csrf.rb', line 11 def ht(x) %(<input type="hidden" name="csrf" value="#{x.usr['uk']}">) end |
#ok?(x) ⇒ Boolean
7 8 9 |
# File 'lib/waxx/csrf.rb', line 7 def ok?(x) x['csrf'] == x.usr['uk'] end |