提交 3a4d0b1e 编写于 作者: C Carlos Antonio da Silva

Refactor to use flat_map

上级 ee751643
......@@ -2,7 +2,7 @@
# used by all associations.
#
# The hierarchy is defined as follows:
# Association
# Association
# - SingularAssociation
# - BelongsToAssociation
# - HasOneAssociation
......@@ -66,7 +66,7 @@ def macro
end
def valid_options
Association.valid_options + Association.extensions.map(&:valid_options).flatten
Association.valid_options + Association.extensions.flat_map(&:valid_options)
end
def validate_options
......@@ -77,7 +77,7 @@ def validate_options
# class Post < ActiveRecord::Base
# has_many :comments
# end
#
#
# Post.first.comments and Post.first.comments= methods are defined by this method...
def define_accessors
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册