search for: instructor_profile

Displaying 1 result from an estimated 1 matches for "instructor_profile".

2013 Mar 05
4
searching model and has_one association
Howdy. I have these models: User, field "mundane_name" user has_one :instructor_profile (may or may not exist) instructor_profile, field "sca_name" belongs_to :user I would like to craft a search on these fields, which is effectively this, but in one go: matching_users = User.where("mundane_name ILIKE ?", "%#{target}%") matching_profiles = InstructorPr...