Skip to content

Instantly share code, notes, and snippets.

@RogerPodacter
Created December 7, 2010 03:42
Show Gist options
  • Select an option

  • Save RogerPodacter/731419 to your computer and use it in GitHub Desktop.

Select an option

Save RogerPodacter/731419 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
before_filter :ensure_http
def ensure_http
redirect_to 'http://' + request.host + request.request_uri if request.protocol == 'https://'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment