Permalink
Browse files

Remove initialize variable columnn, not needed

  • Loading branch information...
1 parent d5ddc6c commit 2a8f34ad8b968e44916d238adafac44d7b14a25b @pacoguzman pacoguzman committed Jan 29, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 activerecord/lib/active_record/validations/uniqueness.rb
@@ -57,8 +57,7 @@ def find_finder_class_for(record) #:nodoc:
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]

0 comments on commit 2a8f34a

Please sign in to comment.