Class: TesterBarController

Inherits:
ApplicationController show all
Defined in:
app/controllers/tester_bar_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#after_sign_in_path_for, #api_authenticate!, #current_project, #expire_revision!, #followed_projects, #no_cache, #read_revision, #require_login, #return_or_cache_revision!, #revision, #unfurling?, #with_current_project

Methods included from UrlHelper

#feature_path, #link_to_project_feature

Instance Method Details

#login_asObject



3
4
5
6
7
8
9
10
# File 'app/controllers/tester_bar_controller.rb', line 3

def 
  user = User.find_by_email(params[:email])
  if user
    flash[:notice] = "You have signed in as #{user.name}"
    (user)
  end
  redirect_to request.referrer || root_url
end