diff options
author | Xavier Noria <fxn@hashref.com> | 2016-09-02 00:43:33 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-09-02 00:43:33 +0200 |
commit | 810dff7c9fa9b2a38eb1560ce0378d760529ee6b (patch) | |
tree | d5ea948c1f0043c7bc4c5b10241279e448a6d696 /activerecord | |
parent | 11eaf1c1dd48e86a38b8dc83a2b35d99f746b1f8 (diff) | |
download | rails-810dff7c9fa9b2a38eb1560ce0378d760529ee6b.tar.gz rails-810dff7c9fa9b2a38eb1560ce0378d760529ee6b.tar.bz2 rails-810dff7c9fa9b2a38eb1560ce0378d760529ee6b.zip |
RuboCop is 100% green :tada:
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index 8c5e4d042e..9b692f55d2 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -14,18 +14,19 @@ module ActiveRecord end def self.create(macro, name, scope, options, ar) - klass = case macro - when :composed_of - AggregateReflection - when :has_many - HasManyReflection - when :has_one - HasOneReflection - when :belongs_to - BelongsToReflection - else - raise "Unsupported Macro: #{macro}" - end + klass = \ + case macro + when :composed_of + AggregateReflection + when :has_many + HasManyReflection + when :has_one + HasOneReflection + when :belongs_to + BelongsToReflection + else + raise "Unsupported Macro: #{macro}" + end reflection = klass.new(name, scope, options, ar) options[:through] ? ThroughReflection.new(reflection) : reflection |