1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove initialize variable columnn, not needed

This commit is contained in:
Paco Guzman 2012-01-29 15:31:38 +01:00
parent d5ddc6c1f7
commit 2a8f34ad8b

View file

@ -57,8 +57,7 @@ module ActiveRecord
def build_relation(klass, table, attribute, value) #:nodoc:
reflection = klass.reflect_on_association(attribute)
column = nil
if(reflection)
if reflection
column = klass.columns_hash[reflection.foreign_key]
attribute = reflection.foreign_key
value = value.attributes[reflection.primary_key_column.name]