mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +08:00
Merge pull request #611 from okriuchykhin/ok_SCI_1252
Fix root_url method unavailable in application_helper [SCI-1252]
This commit is contained in:
commit
f239238064
4 changed files with 14 additions and 1 deletions
|
@ -226,6 +226,7 @@ module ApplicationHelper
|
|||
unless user.avatar(style) == '/images/icon_small/missing.png'
|
||||
return user.avatar(style)
|
||||
end
|
||||
URI.join(root_url, "/images/#{style}/missing.png").to_s
|
||||
URI.join(Rails.application.routes.url_helpers.root_url,
|
||||
"/images/#{style}/missing.png").to_s
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,6 +13,10 @@ Rails.application.configure do
|
|||
config.consider_all_requests_local = true
|
||||
config.action_controller.perform_caching = false
|
||||
|
||||
Rails.application.routes.default_url_options = {
|
||||
host: Rails.application.secrets.mail_server_url
|
||||
}
|
||||
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.default_url_options = {
|
||||
host: Rails.application.secrets.mail_server_url
|
||||
|
|
|
@ -14,6 +14,10 @@ Rails.application.configure do
|
|||
config.consider_all_requests_local = false
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
Rails.application.routes.default_url_options = {
|
||||
host: Rails.application.secrets.mail_server_url
|
||||
}
|
||||
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.default_url_options = {
|
||||
host: Rails.application.secrets.mail_server_url
|
||||
|
|
|
@ -36,6 +36,10 @@ Rails.application.configure do
|
|||
# ActionMailer::Base.deliveries array.
|
||||
config.action_mailer.delivery_method = :test
|
||||
|
||||
Rails.application.routes.default_url_options = {
|
||||
host: Rails.application.secrets.mail_server_url
|
||||
}
|
||||
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.default_url_options = { host: Rails.application.secrets.mail_server_url }
|
||||
config.action_mailer.default_options = { from: Rails.application.secrets.mail_from }
|
||||
|
|
Loading…
Reference in a new issue