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? And

end

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

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -