Skip to content

Commit

Permalink
fix: standardrb
Browse files Browse the repository at this point in the history
  • Loading branch information
Waishnav committed Aug 24, 2024
1 parent 21c2a78 commit 74ac3d6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/simple_discussion/forum_threads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ def destroy
end

def search
if params[:query].present?
@forum_threads = ForumThread.search(params[:query])
@forum_threads = if params[:query].present?
ForumThread.search(params[:query])
.includes(:user, :forum_category)
.paginate(per_page: 10, page: page_number)
else
@forum_threads = []
[]
end
render :index
end
Expand Down

0 comments on commit 74ac3d6

Please sign in to comment.