How to set config.action_controller.default_url_options = {:host = '#''} on per environment basis

前端 未结 7 875
再見小時候
再見小時候 2020-12-12 22:20

Right now I\'m using this which works for the development host, but I have to manually change the {:host => \"\"} code when I move to production.

post.rb



        
7条回答
  •  难免孤独
    2020-12-12 23:19

    config.action_mailer.default_url_options = { :host => "your host" }

    for instance your host localhost:3000

    you can put this in test.rb, development.rb, production.rb files host could be different from environment to environment

提交回复
热议问题