lib/rodauth/rails/feature.rb in rodauth-rails-0.6.1 vs lib/rodauth/rails/feature.rb in rodauth-rails-0.7.0
- old
+ new
@@ -47,9 +47,14 @@
# Default the flash error key to Rails' default :alert.
def flash_error_key
:alert
end
+ # Evaluates the block in context of a Rodauth controller instance.
+ def rails_controller_eval(&block)
+ rails_controller_instance.instance_exec(&block)
+ end
+
private
# Runs controller callbacks and rescue handlers around Rodauth actions.
def _around_rodauth(&block)
result = nil