mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 18:45:41 +01:00
Use Rails.env.local?
shorthand method to check env (#27519)
This commit is contained in:
parent
4aa05d45fc
commit
12550a6a28
2 changed files with 2 additions and 2 deletions
|
@ -488,7 +488,7 @@ class User < ApplicationRecord
|
|||
end
|
||||
|
||||
def validate_email_dns?
|
||||
email_changed? && !external? && !(Rails.env.test? || Rails.env.development?)
|
||||
email_changed? && !external? && !Rails.env.local? # rubocop:disable Rails/UnknownEnv
|
||||
end
|
||||
|
||||
def validate_role_elevation
|
||||
|
|
|
@ -206,7 +206,7 @@ module Mastodon
|
|||
# We use our own middleware for this
|
||||
config.public_file_server.enabled = false
|
||||
|
||||
config.middleware.use PublicFileServerMiddleware if Rails.env.development? || Rails.env.test? || ENV['RAILS_SERVE_STATIC_FILES'] == 'true'
|
||||
config.middleware.use PublicFileServerMiddleware if Rails.env.local? || ENV['RAILS_SERVE_STATIC_FILES'] == 'true' # rubocop:disable Rails/UnknownEnv
|
||||
config.middleware.use Rack::Attack
|
||||
config.middleware.use Mastodon::RackMiddleware
|
||||
|
||||
|
|
Loading…
Reference in a new issue