Permalink
Browse files

Included table names with "equals" scope column names when using attr…

…ibute_condition.

Signed-off-by: Ben Johnson <bjohnson@binarylogic.com>
  • Loading branch information...
1 parent 84d90e7 commit 22c6d42bda05ff5c70a418f5aebdd088459e55dc laserlemon committed with Aug 19, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/searchlogic/named_scopes/conditions.rb
View
2 lib/searchlogic/named_scopes/conditions.rb
@@ -106,7 +106,7 @@ def create_primary_condition(column, condition)
scope_options = case condition.to_s
when /^equals/
- scope_options(condition, column_type, lambda{|a| attribute_condition(column, a) })
+ scope_options(condition, column_type, lambda{|a| attribute_condition("#{table_name}.#{column}", a) })
when /^does_not_equal/
scope_options(condition, column_type, "#{table_name}.#{column} != ?")
when /^less_than_or_equal_to/

0 comments on commit 22c6d42

Please sign in to comment.