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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:41:42+00:00 2026-06-07T19:41:42+00:00

What is the process of finding the documentation for a method in Ruby/Rails api

  • 0

What is the process of finding the documentation for a method in Ruby/Rails api http://api.rubyonrails.org/ .

Let’s take method ActiveRecord::Base.update as an example. It is used in one of the railscasts.

  1. There is no mention of update in the api doc for the class
    http://api.rubyonrails.org/classes/ActiveRecord/Base.html
  2. There’s
    nothing about update method in the source code for Base
    https://github.com/rails/rails/blob/0065f378262dc3f47880ce6211c7474bc7d11f0b/activerecord/lib/active_record/base.rb
  3. In fact, I can’t even find this method in any classes included in
    ActiveRecord::Base.

I suspect this method is in ActiveRecord::Relation. However, I’m not sure.

I’m a beginner in Ruby/Rails, and I come from Java world, where I would normally expect to see all methods (inherited as well) in a javadoc for the class. What is the most effective finding relevant documentation for mixed-in/inherited methods in case of Ruby/Rails?

Thanks in advance!

  • 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-06-07T19:41:43+00:00Added an answer on June 7, 2026 at 7:41 pm

    You probably can’t find any good documentation about ActiveRecord::Base#update because the method has been deprecated since Rails version 2.3.8, according to APIdock..

    The reason you can still use it is because it has been moved to ActiveRecord::Relation which can be seen in rails/activerecord/lib/active_record/relation.rb.

    rails/activerecord/lib/active_record.rb contains all the autoloads for ActiveRecord which includes :Relation.

    The documentation for ActiveRecord::Relation#update is as follows:

    Updates an object (or multiple objects) and saves it to the database,
    if validations pass. The resulting object is returned whether the
    object was saved successfully to the database or not.

    ==== Parameters

    • +id+ – This should be the id or an array of ids to be updated.
    • +attributes+ – This should be a hash of attributes or an array of hashes.

    ==== Examples

    # Updates one record 
    Person.update(15, :user_name => 'Samuel', :group => 'expert')
    
    # Updates multiple records 
    people = { 1 => { "first_name" => "David" }, 2 => { "first_name" => "Jeremy" } }       
    Person.update(people.keys, people.values)
    

    EDIT: To answer your initial question, under most circumstances, doing a search on api.rubyonrails.org is enough to find the information you are looking for, as long as the information is up-to-date.

    For potentially older API details, use apidock.com/rails. Doing a search there for ‘update’ actually shows both versions (::Base and ::Relation) and gives you details about each and what version of Rails each are used in.

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

Sidebar

Related Questions

I'm having trouble understanding the documentation of os.times() . From http://docs.python.org/library/os.html : Return a
So I am finding this process of universalizing my iPhone app to be a
I am finding it hard to understand the process of Naive Bayes, and I
I have a process which has a notify method which receives as a parameter
I have an application using NServiceBus to process messages, and while debugging I'm finding
Can any one throw some light on the process of finding old recovery files
So, I'm in the process of learning node, and am finding that for testing,
In the process of finding a way to validate my django forms, I came
I've had a hard time finding references in the TR1 documentation concerning shared arrays.
I don't remember going through the process of finding a unique Application name. If

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.