trying to do this advance seach using the pg_seach gem pg_search
There is my advance_search
pg_search_scope :advance_search, using: { tsearch: { dictionary: "spanish"} },
associated_against: {summary: [:summary_description, :specialties], experience: [:description, :job_title], study: [:study_title], course: [:title], language: [:language]}
this is the method
def self.advsearch(summary_description, specialties, place, study, course, language)
end
As you can imagine the parameters could be present all of them, none of them or some of them
so incide my method I would like to do somehting like :summary => summary_description.present? or something like that, also is the parameter is not present the pg_search doesn’t need the joing. I don’t find anything similar in the help. So I need the help of all of you
Thanks in advance.