Skip to content

Instantly share code, notes, and snippets.

@kozo002
Created December 5, 2011 07:51
Show Gist options
  • Select an option

  • Save kozo002/1432772 to your computer and use it in GitHub Desktop.

Select an option

Save kozo002/1432772 to your computer and use it in GitHub Desktop.
after Devise login redirect without ssl
class Users::SessionsController < Devise::SessionsController
# POST /users/sign_in
def create
resource = warden.authenticate!(:scope => resource_name, :recall => "#{controller_path}#new")
set_flash_message(:notice, :signed_in) if is_navigational_format?
sign_in(resource_name, resource)
respond_with resource, :location => "http://#{request.host_with_port}#{redirect_location(resource_name, resource)}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment