Force every request to https using Rack middleware in Rails Apps >= 3.0.*.
gem 'force_ssl', :git => '[email protected]:bseanvt/force_ssl.git'
In config/environments/production.rb
config.middleware.use "ForceSsl::ForceSSL"
All done!
For a more thorough library checkout out https://github.com/tobmatth/rack-ssl-enforcer