public
Fork of lifo/docrails
Description: PLEASE CHECK http://github.com/lifo/docrails/wikis
Homepage: http://weblog.rubyonrails.org/2008/5/2/help-improve-rails-documentation-on-git-branch
Clone URL: git://github.com/TampaRuby/docrails.git
Search Repo:
Corrected & extended abstract_class? docs
ambethia (author)
Thu May 15 17:13:01 -0700 2008
commit  9a8060f5351e702172beb54cd968e59a370990a0
tree    e841d212ab9692d8f4703ffcbb1d98fdb9e05b98
parent  4e2bc02163aa646ab1304b1b5bec98a7af8927f5
...
1270
1271
1272
1273
1274
 
 
 
 
 
 
 
 
 
 
 
 
 
1275
1276
1277
...
1270
1271
1272
 
 
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
0
@@ -1270,8 +1270,19 @@
0
       # Set this to true if this is an abstract class (see #abstract_class?).
0
       attr_accessor :abstract_class
0
 
0
- # Returns whether this class is a base AR class. If A is a base class and
0
- # B descends from A, then B.base_class will return B.
0
+ # Returns whether this class is a base AR class.
0
+ #
0
+ # class AbstractPerson < ActiveRecord::Base
0
+ # self.abstract_class = true
0
+ # end
0
+ #
0
+ # class Person < AbstractPerson
0
+ # end
0
+ #
0
+ # ActiveRecord::Base.abstract_class? # => false
0
+ # AbstractPerson.abstract_class? # => true
0
+ # Person.abstract_class? # => false
0
+ #
0
       def abstract_class?
0
         defined?(@abstract_class) && @abstract_class == true
0
       end

Comments

    No one has commented yet.