Skip to content

Commit

Permalink
Use type_condition method for hmt STI condition
Browse files Browse the repository at this point in the history
  • Loading branch information
tarmo authored and jeremy committed Aug 15, 2008
1 parent 762ee05 commit 6660206
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def build_through_conditions
end

def build_sti_condition
"#{@reflection.through_reflection.quoted_table_name}.#{@reflection.through_reflection.klass.inheritance_column} = #{@reflection.klass.quote_value(@reflection.through_reflection.klass.sti_name)}"
@reflection.through_reflection.klass.send(:type_condition)
end

alias_method :sql_conditions, :conditions
Expand Down

0 comments on commit 6660206

Please sign in to comment.