rails : return the two different joined results -
Research based on "role" for role in my user model = 4 I need to return two combined results, But this only returns the end result (User.tempexaminee_users) how can I get involved in these results. If role == 4
def self.search (search, role)
If role == 3
Users . Questionetter_users.where (like [login] or like a name? Or as an email? Andend
If the role == 4
user .examinee_users.where ((like 'login or like a name or email like? And role_id =?', '% # {Search}% ","% # {search}% ","% # {search}% ", role]) users .tempexaminee_users.where ([like login? ? Or like email? ', "% # {Search}%", "% # {search}%", "% # {search}%"])end
End
returned to the Combined Result Step Should go if role == 4.
Comments
Post a Comment