Skip to content

Instantly share code, notes, and snippets.

@tbbooher
Created February 7, 2009 02:04
Show Gist options
  • Select an option

  • Save tbbooher/59731 to your computer and use it in GitHub Desktop.

Select an option

Save tbbooher/59731 to your computer and use it in GitHub Desktop.
def ssl_required?
# (Comment this one line out if you want to test ssl locally)
return false if local_request?
# always return false for tests
return false if RAILS_ENV == 'test'
if RAILS_ENV == 'staging'
# need to set custom request.host
super
else # we need to just use the filters
super
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment