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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:21:42+00:00 2026-05-25T11:21:42+00:00

Right now I have: @models = ActiveRecord::Base.send(:subclasses) But I get this in the log:

  • 0

Right now I have:

  @models = ActiveRecord::Base.send(:subclasses)

But I get this in the log:

DEPRECATION WARNING: subclasses is deprecated and will be removed from Rails 3.0 (use descendants instead). (called from send at /Users/*******/m3p0/app/controllers/roles_controller.rb:50)

What should I replace :subclasses with?

  • 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-25T11:21:43+00:00Added an answer on May 25, 2026 at 11:21 am

    It is in the warning, it says use descendants instead.

    ActiveRecord::Base.send(:descendants)
    

    Also, these methods are publicly available so you don’t need to use the .send syntax, you can call it explicitly.

    ActiveRecord::Base.descendants
    

    Here is the output from one of my apps:

    ruby-1.9.2-p180 :001 > ActiveRecord::Base.subclasses
     => [Achievement(id: integer... 
    ruby-1.9.2-p180 :003 >   ActiveRecord::Base.descendants
     => [Achievement(id: integer...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Right now I have this SQL query which is valid but always times out:
Right now, I have three models Post, Comment and User (using Devise ) associated
I have the following models: class Price < ActiveRecord::Base belongs_to :product end class Metric
In have 3 models here: projects threads (project_id) thread_participations (thread_id, read boolean) Right now
so I have two models: class User < ActiveRecord::Base has_and_belongs_to_many :followed_courses, :class_name => Course
i have 4 models. I want to delete question, but now i cant. Dont
I have the following models: class Instance < ActiveRecord::Base has_many :users has_many :books end
Right now, I have more than 25 vertices that form a model. I want
Good day! I right now have a function the drags an element from a
Right now I have a database (about 2-3 GB) in PostgreSQL, which serves as

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.