Sha256: 1e6019e9e7277501b60deaa1ff5fe3c43c06b1612aca0e3ec01e4c6e259836d5

Contents?: true

Size: 321 Bytes

Versions: 26

Compression:

Stored size: 321 Bytes

Contents

class CustomFailure < Devise::FailureApp
  def redirect_url
    #return super unless [:worker, :employer, :user].include?(scope) #make it specific to a scope
    root_path
  end

  # You need to override respond to eliminate recall
  def respond
    if http_auth?
      http_auth
    else
      redirect
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
beautiful_scaffold-2.0.0 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-2.0.0.pre lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-1.0.2 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-1.0.1 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-1.0.0.pre lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.6 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.5 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.4 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.3 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.2 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.1 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.0.rc6 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.0.rc5 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.0.rc4 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.0.rc3 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.0.rc2 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.0.rc1 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.3.0.pre lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.2.7 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.2.6 lib/generators/templates/lib/custom_failure.rb