RailsでHTTPS通信

Railsで全ページのSSL通信を強制するには、configファイルで、

MyApp::Application.configure do
  # ...
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. 
  config.force_ssl = true
  # ...
end

とすればいけます!

config/enviroments/production.rbならもともとコメントとして挿入されてました!

SSL

参考サイト

config.force_ssl is different than controller force_ssl

force_ssl - リファレンス - - Railsドキュメント