Displaying 1 result from an estimated 1 matches for "summary_description".
2012 Dec 18
1
Arel limit Where if fields are present
I trying to create a select using Arel but I''m passing three parameters, I
want to include the parameters only if they are different to nil or blank.
Here is my method:
def self.advsearch(summary_description, specialties, place)
User.joins(:experience,:summary,:information)
.where(Information.arel_table[:business].eq(false))
.where(Experience.arel_table[:description].matches("%#{summary_description}%")
.or(Experience.arel_table[:descript...