Rails 3.1+ I want my url helpers to use the https protocol without having to specify it in every helper I call. After searching around I\'ve found various ways but none work
For a rails 5.2.0 RESTAPI App the following worked:
In each environment file as necessary ie config/environments/test.rb
Rails.application.routes.default_url_options[:protocol] = 'https'
Controller code:
Rails.application.routes.url_helpers.url_for(uploaded_file)