Reputation: 110950
I have a share dialog.
On dev it looks like:
http://xxxxxx.com/stuff
On prod:
https://yyyyyyyyyyy.com/stuff
What's the best rails way to output #Protocol# #URL#
And where can I set these in rails? thanks
Upvotes: 13
Views: 14304
Reputation: 3611
Try adding the following to your development.rb file
Rails.application.routes.default_url_options[:protocol] = 'http'
and in production.rb file
Rails.application.routes.default_url_options[:protocol] = 'https'
Upvotes: 2