Skip to content

Commit

Permalink
Default Sinatra::Default logout to use ::User.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyril David committed Oct 18, 2010
1 parent 1a70f87 commit 41e2c09
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/shield/contrib/sinatra/default.rb
Expand Up @@ -21,6 +21,10 @@ def is_logged_in?
def ensure_authenticated(model = User)
super
end

def logout(model = User)
super
end
end

m.get "/login" do
Expand All @@ -37,7 +41,7 @@ def ensure_authenticated(model = User)
end

m.get "/logout" do
logout(User)
logout
redirect settings.shield_redirect_after_logout
end
end
Expand Down

0 comments on commit 41e2c09

Please sign in to comment.