diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-22 01:31:14 +0300 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-22 01:31:14 +0300 |
commit | f40716f48a25809d197ba2abf32ce150b7b73efa (patch) | |
tree | 3356ea055ddee37517467c1f0ed4f4b98f655e6f /config | |
parent | deb62183edbd9111691f62a4f6a9febb1fcd79f7 (diff) |
No more and/or
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/mysql_ignore_postgresql_options.rb | 2 | ||||
-rw-r--r-- | config/initializers/rack_lineprof.rb | 2 | ||||
-rw-r--r-- | config/routes/sidekiq.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/config/initializers/mysql_ignore_postgresql_options.rb b/config/initializers/mysql_ignore_postgresql_options.rb index 835f3ec5574..9a569be7674 100644 --- a/config/initializers/mysql_ignore_postgresql_options.rb +++ b/config/initializers/mysql_ignore_postgresql_options.rb @@ -31,7 +31,7 @@ if defined?(ActiveRecord::ConnectionAdapters::Mysql2Adapter) end def add_index_options(table_name, column_name, options = {}) - if options[:using] and options[:using] == :gin + if options[:using] && options[:using] == :gin options = options.dup options.delete(:using) end diff --git a/config/initializers/rack_lineprof.rb b/config/initializers/rack_lineprof.rb index 22e77a32c61..f7172fce9bc 100644 --- a/config/initializers/rack_lineprof.rb +++ b/config/initializers/rack_lineprof.rb @@ -1,7 +1,7 @@ # The default colors of rack-lineprof can be very hard to look at in terminals # with darker backgrounds. This patch tweaks the colors a bit so the output is # actually readable. -if Rails.env.development? and RUBY_ENGINE == 'ruby' and ENV['ENABLE_LINEPROF'] +if Rails.env.development? && RUBY_ENGINE == 'ruby' && ENV['ENABLE_LINEPROF'] Rails.application.config.middleware.use(Rack::Lineprof) module Rack diff --git a/config/routes/sidekiq.rb b/config/routes/sidekiq.rb index d3e6bc4c292..0fa23f2b3d0 100644 --- a/config/routes/sidekiq.rb +++ b/config/routes/sidekiq.rb @@ -1,4 +1,4 @@ -constraint = lambda { |request| request.env['warden'].authenticate? and request.env['warden'].user.admin? } +constraint = lambda { |request| request.env['warden'].authenticate? && request.env['warden'].user.admin? } constraints constraint do mount Sidekiq::Web, at: '/admin/sidekiq', as: :sidekiq end |