Module: Rodauth::Rails::Feature::Csrf
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/rodauth/rails/feature/csrf.rb
Instance Method Summary collapse
-
#check_csrf ⇒ Object
Verify Rails’ authenticity token.
-
#check_csrf? ⇒ Boolean
Have Rodauth call #check_csrf automatically.
-
#csrf_tag ⇒ Object
Render Rails CSRF tags in Rodauth templates.
Instance Method Details
#check_csrf ⇒ Object
Verify Rails’ authenticity token.
22 23 24 |
# File 'lib/rodauth/rails/feature/csrf.rb', line 22 def check_csrf rails_check_csrf! if rails_controller_csrf? end |
#check_csrf? ⇒ Boolean
Have Rodauth call #check_csrf automatically.
27 28 29 |
# File 'lib/rodauth/rails/feature/csrf.rb', line 27 def check_csrf? rails_check_csrf? if rails_controller_csrf? end |
#csrf_tag ⇒ Object
Render Rails CSRF tags in Rodauth templates.
17 18 19 |
# File 'lib/rodauth/rails/feature/csrf.rb', line 17 def csrf_tag(*) rails_csrf_tag if rails_controller_csrf? end |