This project is archived and is in readonly mode.

#5388 ✓wontfix
Thiago Pradi

Cleaning abstract_class? method

Reported by Thiago Pradi | August 16th, 2010 @ 11:50 PM

Hi Guys,

This patch removes unnecessary code from abstract_class? method.

Comments and changes to this ticket

  • Santiago Pastorino

    Santiago Pastorino August 17th, 2010 @ 02:16 AM

    • State changed from “new” to “wontfix”
    • Importance changed from “” to “Low”

    This code

    defined?(@abstract_class) && @abstract_class == true
    

    Makes abstract_class? return true if and only if @abstract_class value is true.

    Also docs says you have to assign true to this value

    # Set this to true if this is an abstract class (see <tt>abstract_class?</tt>).
    attr_accessor :abstract_class
    

    So you're changing the semantics here and allowing things like abstract_class = "hello" to set the model as an abstract_class

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages