Skip to content

Commit

Permalink
more rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
raycarrick-ed committed Jan 25, 2022
1 parent 459555e commit ea07fa8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ AllCops:
- 'db/**/*'
- 'vendor/**/*'
- 'node_modules/**/*'
- 'scripts/**/*'

# Automatically add any new Cops to this file and enable them
NewCops: enable
Expand Down Expand Up @@ -165,6 +166,8 @@ Style/NumberedParameters: # new in 1.22
Enabled: true
Style/NumberedParametersLimit: # new in 1.22
Enabled: true
Style/OpenStructUse:
Enabled: false # used heavily in API so needs a lot of work to refactor
Style/QuotedSymbols: # new in 1.16
Enabled: true
Style/RedundantArgument: # new in 1.4
Expand All @@ -179,6 +182,7 @@ Style/StringLiterals:
Enabled: true
Exclude:
- 'app/views/**/*'
- 'config/**/*'

Style/SwapValues: # new in 1.1
Enabled: true
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/org_admin/plans_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def index
sql = 'users.org_id = ? AND plans.feedback_requested is TRUE AND roles.active is TRUE'
feedback_ids = Role.creator.joins(:user, :plan)
.where(sql, current_user.org_id).pluck(:plan_id)
@feedback_plans = Plan.where(id: feedback_ids).reject(&:nil?)
@feedback_plans = Plan.where(id: feedback_ids).compact

@super_admin = current_user.can_super_admin?
@clicked_through = params[:click_through].present?
Expand Down
2 changes: 2 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true

# rubocop:disable Metrics/BlockLength
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.

Expand Down Expand Up @@ -94,6 +95,7 @@
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
end
# rubocop:enable Metrics/BlockLength

# Used by Rails' routes url_helpers (typically when including a link in an email)
Rails.application.routes.default_url_options[:host] = 'example.org'

0 comments on commit ea07fa8

Please sign in to comment.