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-0.2.5 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.2.4 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.2.3 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.2.2 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.2.1 lib/generators/templates/lib/custom_failure.rb
beautiful_scaffold-0.2.0 lib/generators/templates/lib/custom_failure.rb