Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #9 from whitequark/master

Improve flash messages
  • Loading branch information...
commit 70b5f84591acbaa3d5d2901b3ebba1b139eabea3 2 parents 48902d4 + ef6def8
@jondot authored
Showing with 3 additions and 2 deletions.
  1. +1 −1  lib/padrino/warden.rb
  2. +2 −1  lib/padrino/warden/helpers.rb
View
2  lib/padrino/warden.rb
@@ -43,7 +43,7 @@ def self.registered(app)
get :logout do
logout
- flash[:success] = settings.auth_success_message if flash
+ flash[:success] = settings.deauth_success_message if flash
redirect settings.auth_success_path
end
end
View
3  lib/padrino/warden/helpers.rb
@@ -72,8 +72,9 @@ def self.registered(app)
# into a user's session so that to redirect back to it
# upon successful authentication
app.set :auth_use_referrer, false
- app.set :auth_error_message, "Could not log you in."
+ app.set :auth_error_message, "You have provided invalid credentials."
app.set :auth_success_message, "You have logged in successfully."
+ app.set :deauth_success_message, "You have logged out successfully."
app.set :auth_login_template, 'sessions/login'
# OAuth Specific Settings
app.set :auth_use_oauth, false
Please sign in to comment.
Something went wrong with that request. Please try again.