diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 368b9480..0d2f783c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -13,4 +13,8 @@ module ApplicationHelper content_tag 'p', value, :class => key end end + + def login_path_with_return_to + login_path :return_to => request.request_uri + end end diff --git a/app/views/layouts/items.html.haml b/app/views/layouts/items.html.haml index 816c66c0..661c7bdf 100644 --- a/app/views/layouts/items.html.haml +++ b/app/views/layouts/items.html.haml @@ -24,7 +24,7 @@ == You have #{current_user.points} points. = link_to 'Log out', logout_path - else - = link_to login_path, :id => 'userbar-log-in' do + = link_to login_path_with_return_to, :id => 'userbar-log-in' do = image_tag auth_server_icon_url %span Log in #footer