Merge pull request #1323 from ferblape/1322-fix-initializer
Don't fetch setting in dev mode
This commit is contained in:
@@ -12,8 +12,8 @@ Devise.setup do |config|
|
|||||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||||
# note that it will be overwritten if you use your own mailer class
|
# note that it will be overwritten if you use your own mailer class
|
||||||
# with default "from" parameter.
|
# with default "from" parameter.
|
||||||
if Rails.env.test?
|
if Rails.env.test? || !ActiveRecord::Base.connection.table_exists?('settings')
|
||||||
config.mailer_sender = "noreply@example.org"
|
config.mailer_sender = "noreply@consul.dev"
|
||||||
else
|
else
|
||||||
config.mailer_sender = "#{Setting['mailer_from_name']} <#{Setting['mailer_from_address']}>"
|
config.mailer_sender = "#{Setting['mailer_from_name']} <#{Setting['mailer_from_address']}>"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user