# frozen_string_literal: truemoduleOptionallySearchextendActiveSupport::ConcernmoduleClassMethodsdefsearch(*)raise(NotImplementedError,'Your model must implement the "search" class method')end# Optionally limits a result set to those matching the given search query.defoptionally_search(query=nil)query.present??search(query):allendendend