Skip to content

Commit

Permalink
limit nearby activity to 200
Browse files Browse the repository at this point in the history
limit nearby activity to 300
  • Loading branch information
RyanTG committed Jan 11, 2025
1 parent d3a03d4 commit 4735f51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/user_submissions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def create
def list_within_range
user_submissions = UserSubmission.where.not(lat: nil)
.where(submission_type: %w[new_lmx remove_machine new_condition new_msx confirm_location],created_at: '2019-05-03T07:00:00.00-07:00'..Date.today.end_of_day)
.near([params[:lat], params[:lon]], 100, order: false)
.near([params[:lat], params[:lon]], 100, order: false).limit(200)
sorted_submissions = user_submissions.order('created_at DESC')
render partial: "maps/nearby_activity", locals: { sorted_submissions: sorted_submissions }
render partial: 'maps/nearby_activity', locals: { sorted_submissions: sorted_submissions }
end

private
Expand Down

0 comments on commit 4735f51

Please sign in to comment.