Skip to content

Instantly share code, notes, and snippets.

@WassifAziz
Created September 6, 2012 09:14
Show Gist options
  • Save WassifAziz/3653500 to your computer and use it in GitHub Desktop.
Save WassifAziz/3653500 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
protect_from_forgery
def after_sign_in_path_for(resource_or_scope)
if current_user.sign_in_count == 1
new_when_path
else
root_path
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment