Last Updated: September 27, 2021
·
4.261K
· hidakatsuya

Set the protocol to https URL that is generated by UrlHelper

Add this line to config/environments/development.rb:

config.action_controller.default_url_options[:protocol] = 'https'

Then,

% rails c
> app.articles_url
  => https://www.example.com/articles