1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

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