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 6070607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:57:09+00:00 2026-05-23T09:57:09+00:00

Whenever I do: Person.where(…) I get a Criteria object. That’s understandable. But I couldn’t

  • 0

Whenever I do:

Person.where(...)

I get a Criteria object. That’s understandable. But I couldn’t find how do I get access to actual models collection? For now, I have to do this workaround:

Person.where(...).map { |person| person }

And then query gets executed and I have an array of Person objects. Is there an easier method? #all doesn’t seem to work, it returns the same Criteria object.

  • 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-23T09:57:10+00:00Added an answer on May 23, 2026 at 9:57 am

    Just convert the Criteria object to an array:

    Person.all.to_a
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to add the datetime object of a person. Whenever the birth
Whenever I run this script the find part executes but the if statement causes
Whenever I click the ImageView which has a OnClickListener , I get the URL
I'm trying to initiate an ajax request whenever a person changes the value of
Dumb question, but whenever you call new, do you always have a pointer? SomeClass
I have a security.conf file that requires users to login whenever they visit my
Consider the following hypothetical people management system. Suppose each Person object belong to a
Whenever I close my Gtk# application, I get this: (/home/matthew/opensbs/OpenSBS/bin/Debug/OpenSBS.exe:5050): GLib-WARNING **: g_set_prgname() called
I am currently using Unity 3D to create a 3rd person game. But I
i have wrote an agent which works like this- whenever my subordinates get any

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.