aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/reflection.rb25
1 files changed, 13 insertions, 12 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 8ddf5cfa66..e88c5d17cb 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -367,21 +367,22 @@ module ActiveRecord
protected
- def actual_source_reflection # FIXME: this is a horrible name
- self
- end
+ def actual_source_reflection # FIXME: this is a horrible name
+ self
+ end
private
- def calculate_constructable(macro, options)
- case macro
- when :belongs_to
- !options[:polymorphic]
- when :has_one
- !options[:through]
- else
- true
+
+ def calculate_constructable(macro, options)
+ case macro
+ when :belongs_to
+ !options[:polymorphic]
+ when :has_one
+ !options[:through]
+ else
+ true
+ end
end
- end
# Attempts to find the inverse association name automatically.
# If it cannot find a suitable inverse association name, it returns