Skip to content

Commit

Permalink
Merge 08d4cb4 into b9f80b6
Browse files Browse the repository at this point in the history
  • Loading branch information
markottaviani authored Dec 11, 2023
2 parents b9f80b6 + 08d4cb4 commit 4ec0ce9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/cat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class Cat < ApplicationRecord
# Rails 5.2 issues deprecation errors for any order that is not column names
# so arel is the workaround
scope :sort_with_search_term_matches_first, ->(search_term) { order(Cat.arel_table[:name].does_not_match("#{search_term}%"), "tracking_id asc") }
scope :gallery_view, -> { includes(:primary_breed, :secondary_breed, :photos, :foster).where(status: Cat::PUBLIC_STATUSES).status_order.order(:tracking_id) }
scope :gallery_view, -> { includes(:primary_breed, :secondary_breed, :photos, :foster).where(status: Cat::PUBLIC_STATUSES).where('hidden' => false).status_order.order(:tracking_id) }

def self.autocomplete_name(search_term = nil)
if search_term.present?
Expand Down

0 comments on commit 4ec0ce9

Please sign in to comment.