Created
October 10, 2011 19:04
-
-
Save patmaddox/1276205 to your computer and use it in GitHub Desktop.
A little helper to allow logging in via URL param
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ApplicationController < ActionController::Base | |
| def login_as_user_param | |
| return unless Rails.env.development? || Rails.env.test? | |
| sign_in(User.find(params['_current_user'])) if params['_current_user'] | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment