From 846123448301fcb394e143f65e32fa5a5cb349dc Mon Sep 17 00:00:00 2001 From: Ania Slimak Date: Thu, 12 Feb 2015 13:07:57 +0100 Subject: [PATCH] Extracted route to separate method to be able to override in child class --- lib/devise/failure_app.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/devise/failure_app.rb b/lib/devise/failure_app.rb index 783d2d6e..a66d53bd 100644 --- a/lib/devise/failure_app.rb +++ b/lib/devise/failure_app.rb @@ -105,9 +105,13 @@ module Devise end end + def route(scope) + :"new_#{scope}_session_url" + end + def scope_url opts = {} - route = :"new_#{scope}_session_url" + route = route(scope) opts[:format] = request_format unless skip_format? config = Rails.application.config