Find instance method "where" in Rails Docs

Hello Experts.

It seems impossible to make a simple task, find given method for given class in Ruby on Rails 3.1.3 docs.

For example, I need to find ActiveRecord#where.

Using link "Methods" in
gives the source code, but no description:

def where(opts, *rest)
  return self if opts.blank?

  relation = clone
  relation.where_values += build_where(opts, rest)

Apparently, the principal site:
has no link to "Methods" or to index at all.

Can you help please?

I just would like to know, can be this call signature used:

User.where activated: true
User.where :activated => true
instead of longly:

User.where("activated == TRUE")

"activated" is a field in table "users".

Thank you.
Who is Participating?
JESiiConnect With a Mentor Commented:
You're right; my favorite site is but no documentation there as well.

Check out - 'where' is referenced in an example with a brief discussion.

Notice that 'where' is an arel (A Relational Algebra) method, so try here:
BitlabAuthor Commented:
PS. I found reference to where in "principal site" using seach.
It gave: where(opts, *rest)
But there is no description of signature.
Here's the Arel version used in Rails:
BitlabAuthor Commented:
Thank you.

Despite there is no doc yet, for me, apidoc is a discovery of nicely usable doc-site.
And ... ARel is looks like a discovery of a huge horizon ... "algebra" is a great way
shape a mind ...
BitlabAuthor Commented:
correction: "ARel is looks" meant "ARel looks"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.