Skip to content

Commit

Permalink
Fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
Throne3d committed Jun 1, 2024
1 parent e70f07d commit ee1395f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ AllCops:
Exclude:
- 'config/initializers/audited.rb'
- 'config/initializers/will_paginate.rb'
- 'db/migrate/**.rb'
- 'db/migrate/*.rb'
- 'db/schema.rb'
- 'backstop/*'
- 'vendor/**/*'
- 'sorbet/**/*'

require:
- rubocop-capybara
Expand Down
5 changes: 4 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ def tos_skippable?
end
helper_method :tos_skippable?

T::Sig::WithoutRuntime.sig { params(relation: Post::PrivateRelation, no_tests: T::Boolean, with_pagination: T::Boolean, select: String, max: T::Boolean, with_unread: T::Boolean, show_blocked: T::Boolean).returns(Post::PrivateRelation) }
T::Sig::WithoutRuntime.sig do
params(relation: Post::PrivateRelation, no_tests: T::Boolean, with_pagination: T::Boolean, select: String, max: T::Boolean,
with_unread: T::Boolean, show_blocked: T::Boolean,).returns(Post::PrivateRelation)
end
def posts_from_relation(relation, no_tests: true, with_pagination: true, select: '', max: false, with_unread: false, show_blocked: false)
posts = posts_relation_filter(relation, no_tests: no_tests, show_blocked: show_blocked)
posts_count = posts.except(:select, :order, :group).count('DISTINCT posts.id')
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/galleries_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def require_own_gallery

def find_user
if params[:user_id].present?
unless (@user = User.active.full.find_by_id(params[:user_id]))
unless (@user = User.active.full.find_by(id: params[:user_id]))
flash[:error] = 'User could not be found.'
redirect_to root_path
end
Expand Down

0 comments on commit ee1395f

Please sign in to comment.