Skip to content

Commit

Permalink
Hobo models -- fix to search for reverse reflection of a has_many :th…
Browse files Browse the repository at this point in the history
…rough
  • Loading branch information
tslocke committed Jun 19, 2008
1 parent 5594264 commit 6032f20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hobo/lib/hobo/model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def search_columns
# FIXME: This should really be a method on AssociationReflection
def reverse_reflection(association_name)
refl = reflections[association_name]
return nil if refl.options[:conditions] || refl.options[:polymorphic]
return nil if refl.options[:conditions] || refl.options[:polymorphic] || refl.options[:through]

reverse_macro = if refl.macro == :has_many
:belongs_to
Expand Down

0 comments on commit 6032f20

Please sign in to comment.