I am trying to build a search engine that searches through four table
that are linked together: Users info table, Years table, Scholarship
table, and Courses table.
I am first searching through the users table using the
User.find(:all, :conditions => condition)
where condition = [‘first_name LIKE ? AND last_name LIKE ? AND
email_address LIKE ? AND institutional_affiliation LIKE ?’,
my_first_name, my_last_name, my_email, my_institute]
all the above fields are in the User table. Now i am trying to use
associations to filter out Users in a specific year, or in a specific
course, or in a specific scholarship Without using nested for loops.
I tried to use the find(:all, :include => ) but however this brings the
courses and the year name without actualy checking a specified
I hope that this is well explained
looking forrword to hearing from you