Add missing information about attributes method.

This commit is contained in:
José Valim 2010-02-28 11:43:13 +01:00
parent 32afcdcb88
commit ae8070e21b
1 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,6 @@ module ActiveModel
# A minimal implementation could be:
#
# class Person
#
# include ActiveModel::AttributeMethods
#
# attribute_method_affix :prefix => 'reset_', :suffix => '_to_default!'
@ -44,9 +43,13 @@ module ActiveModel
# def reset_attribute_to_default!(attr)
# send("#{attr}=", "Default Name")
# end
#
# end
#
#
# Please notice that whenever you include ActiveModel::AtributeMethods in your class,
# it requires you to implement a <tt>attributes</tt> methods which returns a hash with
# each attribute name in your model as hash key and the attribute value as hash value.
# Hash keys must be a string.
#
module AttributeMethods
extend ActiveSupport::Concern