Permalink
Browse files

Passes all existing tests

  • Loading branch information...
1 parent 0022ed1 commit 84785d3fc9fc9929044c4700b44acc28dbec535e @drewmca committed Nov 1, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/counter_culture.rb
View
@@ -280,20 +280,21 @@ def foreign_key_value(relation, was = false)
end
def relation_klass(relation)
- relation_reflect(relation).klass
+ self.class.send :relation_klass, relation
end
def relation_reflect(relation)
- self.class.send :reflect_on_association, relation
+ self.class.reflect_on_association relation
end
def relation_foreign_key(relation)
- relation_reflect(relation).foreign_key
+ self.class.send :relation_foreign_key, relation
end
def first_level_relation_foreign_key(relation)
self.class.send :first_level_relation_foreign_key, relation
end
+
end

0 comments on commit 84785d3

Please sign in to comment.