aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-12-24 11:28:03 +0000
committerJon Leighton <j@jonathanleighton.com>2011-12-24 11:28:03 +0000
commit00318e9bdfc346a57cab34b2ec3724f3e9605ac1 (patch)
treedf689d8bae3f578b2646378f8be0c8068e4fbffc /activerecord/lib/active_record
parentb236f081eb300d2bdabf279d56367517f1e78fae (diff)
downloadrails-00318e9bdfc346a57cab34b2ec3724f3e9605ac1.tar.gz
rails-00318e9bdfc346a57cab34b2ec3724f3e9605ac1.tar.bz2
rails-00318e9bdfc346a57cab34b2ec3724f3e9605ac1.zip
Add some doc for ActiveRecord::Model
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/model.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/model.rb b/activerecord/lib/active_record/model.rb
index 025f40359a..2801938729 100644
--- a/activerecord/lib/active_record/model.rb
+++ b/activerecord/lib/active_record/model.rb
@@ -1,6 +1,13 @@
require 'active_support/deprecation'
module ActiveRecord
+ # <tt>ActiveRecord::Model</tt> can be included into a class to add Active Record persistence.
+ # This is an alternative to inheriting from <tt>ActiveRecord::Base</tt>. Example:
+ #
+ # class Post
+ # include ActiveRecord::Model
+ # end
+ #
module Model
# So we can recognise an AR class even while self.included is being
# executed. (At that time, klass < Model == false.)