Module: BackFormer::Redirecting

Defined in:
lib/back_former/redirecting.rb

Instance Method Summary collapse

Instance Method Details

#redirect_back_former(path = root_path, options = {}) ⇒ Object



5
6
7
# File 'lib/back_former/redirecting.rb', line 5

def redirect_back_former(path = root_path, options = {})
  redirect_to(session[:back_former_previous_path] || path, options)
end

#save_previous_pathObject



9
10
11
# File 'lib/back_former/redirecting.rb', line 9

def save_previous_path
  session[:back_former_previous_path] = request.path
end