Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5953131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:46:50+00:00 2026-05-22T17:46:50+00:00

I have a table called Review and i want to retrieve all review objects

  • 0

I have a table called Review and i want to retrieve all review objects that don’t have :stage equal to "approve".

so something like this: Review.where(:stage not_equal_to "approve")

How can i actually do this? and where can i find the list of calls i can make inside the .where such as less than, greater than etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:46:51+00:00Added an answer on May 22, 2026 at 5:46 pm

    Using pure string condition queries, which are documented in the Rails Guides at http://guides.rubyonrails.org/active_record_querying.html#pure-string-conditions.

    Review.where("stage != ?", "approve")
    

    This can be vulnerable to SQL queries if you go using user values in the string condition, so use the array syntax as above, which replaces the question marks with each passed argument after sanitization.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have table called 'shipped_data' https://i.stack.imgur.com/JXBej.png and need go get all 'caseNumbers' that match
Lets say I have one table called REVIEWS This table has Reviews that customers
I have table called Direccion other called Cliente each one defined like this public
i have table called type which contains data family,individual i want in some pages
In my db I a have table called users. In that table I have
I have a table called ticket in which I want to swap two rows
I have table called product review with columns productreviewid , productid , shopperid ,
I have a table called productreview with columns productreviewid ,product id ,shopperid ,review,rating I
I have table called users and I want to make an exact copy as
I have table called Table A and I have created a trigger that handles

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.