lib/rodauth/rails/feature.rb in rodauth-rails-0.1.3 vs lib/rodauth/rails/feature.rb in rodauth-rails-0.2.0

- old
+ new

@@ -26,25 +26,17 @@ rails_render(partial: page.tr("-", "_"), layout: false) || rails_render(action: page.tr("-", "_"), layout: false) || super end - if Rodauth::MAJOR >= 2 && Rodauth::MINOR >= 1 - # Verify Rails' authenticity token. - def check_csrf - rails_check_csrf! - end + # Verify Rails' authenticity token. + def check_csrf + rails_check_csrf! + end - # Have Rodauth call #check_csrf automatically. - def check_csrf? - true - end - else - # Verify Rails' authenticity token before each Rodauth route. - def before_rodauth - rails_check_csrf! - super - end + # Have Rodauth call #check_csrf automatically. + def check_csrf? + true end # Render Rails CSRF tags in Rodauth templates. def csrf_tag(*) rails_csrf_tag