mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
redirect to requested page after login
This commit is contained in:
parent
2314d943e1
commit
9c35395350
1 changed files with 9 additions and 0 deletions
|
|
@ -2,6 +2,15 @@ class ApplicationController < ActionController::Base
|
|||
include ApplicationHelper
|
||||
protect_from_forgery
|
||||
before_filter :get_conferences
|
||||
before_filter :store_location
|
||||
|
||||
def store_location
|
||||
session[:return_to] = request.fullpath if request.get? and controller_name != "user_sessions" and controller_name != "sessions"
|
||||
end
|
||||
|
||||
def after_sign_in_path_for(resource)
|
||||
session[:return_to]
|
||||
end
|
||||
|
||||
def get_conferences
|
||||
@conferences =Conference.all
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue