首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

Missing host to link to

2012-10-25 
Missing host to link to!Problem:Missing host to link to! Please provide :host parameter or set defa

Missing host to link to!

Problem:
Missing host to link to! Please provide :host parameter or set default_url_options[:host] when sending emails.

Solution:
You can pass host parameter to url functions, but it’s cleaner to configure it with a before_filter globally in your application_controller.rb:

?

  # application_controller.rb  before_filter :mailer_set_url_options   ...   def mailer_set_url_options    ActionMailer::Base.default_url_options[:host] = request.host_with_port  end
?

热点排行