提交 93b1ca8b 编写于 作者: N Nick Rowe

Fix all examples in comments in active_model attribute methods

上级 1c02b988
......@@ -88,7 +88,7 @@ module ClassMethods
#
# attr_accessor :name
# attribute_method_prefix 'clear_'
# define_attribute_methods :name
# define_attribute_methods [:name]
#
# private
#
......@@ -124,7 +124,7 @@ def attribute_method_prefix(*prefixes)
#
# attr_accessor :name
# attribute_method_suffix '_short?'
# define_attribute_methods :name
# define_attribute_methods [:name]
#
# private
#
......@@ -160,7 +160,7 @@ def attribute_method_suffix(*suffixes)
#
# attr_accessor :name
# attribute_method_affix prefix: 'reset_', suffix: '_to_default!'
# define_attribute_methods :name
# define_attribute_methods [:name]
#
# private
#
......@@ -186,7 +186,7 @@ def attribute_method_affix(*affixes)
#
# attr_accessor :name
# attribute_method_suffix '_short?'
# define_attribute_methods :name
# define_attribute_methods [:name]
#
# alias_attribute :nickname, :name
#
......@@ -256,7 +256,7 @@ def define_attribute_methods(*attr_names)
# # Call to define_attribute_method must appear after the
# # attribute_method_prefix, attribute_method_suffix or
# # attribute_method_affix declares.
# define_attribute_method :name
# define_attribute_method [:name]
#
# private
#
......@@ -293,7 +293,7 @@ def define_attribute_method(attr_name)
#
# attr_accessor :name
# attribute_method_suffix '_short?'
# define_attribute_method :name
# define_attribute_method [:name]
#
# private
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册