diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-07-23 21:13:22 -0300 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-07-23 21:13:22 -0300 |
commit | 3a4d0b1e2975122defe86de31fc35ab2dcd9b984 (patch) | |
tree | 5140db09c3e1b2095f95d7501328c53b4830fdf6 /activerecord/lib | |
parent | ee7516436ebb0c415c1b977dfde0fcf42ac017f4 (diff) | |
download | rails-3a4d0b1e2975122defe86de31fc35ab2dcd9b984.tar.gz rails-3a4d0b1e2975122defe86de31fc35ab2dcd9b984.tar.bz2 rails-3a4d0b1e2975122defe86de31fc35ab2dcd9b984.zip |
Refactor to use flat_map
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/association.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/builder/association.rb b/activerecord/lib/active_record/associations/builder/association.rb index 297b7ce6d3..6b6a088806 100644 --- a/activerecord/lib/active_record/associations/builder/association.rb +++ b/activerecord/lib/active_record/associations/builder/association.rb @@ -2,7 +2,7 @@ # used by all associations. # # The hierarchy is defined as follows: -# Association +# Association # - SingularAssociation # - BelongsToAssociation # - HasOneAssociation @@ -66,7 +66,7 @@ module ActiveRecord::Associations::Builder 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 @@ module ActiveRecord::Associations::Builder # class Post < ActiveRecord::Base # has_many :comments # end - # + # # Post.first.comments and Post.first.comments= methods are defined by this method... def define_accessors |