how could I use something like this:
@comments = @company.comments.where(:approved => true).or(:ip => request.remote_ip).all
Should I have to install any specific gem for doing this?
I using rails 3.0.4 and mysql2.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See the “Conditions” section in the documentation, where it explains using multiple parameters in the conditions. Your query would be written: