Permalink
Browse files

Tweak SQL, for consistency.

  • Loading branch information...
1 parent b932c01 commit 2957c9654ffe3bcaa738dd11357818db419eac4f @mdub committed Sep 13, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/arboreal/instance_methods.rb
@@ -51,12 +51,12 @@ def ancestor_conditions
end
def descendant_conditions
- ["#{table_name}.ancestry_string like ?", path_string + "%"]
+ ["#{table_name}.ancestry_string LIKE ?", path_string + "%"]
end
def subtree_conditions
[
- "#{table_name}.id = ? OR #{table_name}.ancestry_string like ?",
+ "#{table_name}.id = ? OR #{table_name}.ancestry_string LIKE ?",
id, path_string + "%"
]
end

0 comments on commit 2957c96

Please sign in to comment.