Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Tweak SQL, for consistency.

  • Loading branch information...
commit 2957c9654ffe3bcaa738dd11357818db419eac4f 1 parent b932c01
Mike Williams authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 lib/arboreal/instance_methods.rb
4 lib/arboreal/instance_methods.rb
@@ -51,12 +51,12 @@ def ancestor_conditions
51 51 end
52 52
53 53 def descendant_conditions
54   - ["#{table_name}.ancestry_string like ?", path_string + "%"]
  54 + ["#{table_name}.ancestry_string LIKE ?", path_string + "%"]
55 55 end
56 56
57 57 def subtree_conditions
58 58 [
59   - "#{table_name}.id = ? OR #{table_name}.ancestry_string like ?",
  59 + "#{table_name}.id = ? OR #{table_name}.ancestry_string LIKE ?",
60 60 id, path_string + "%"
61 61 ]
62 62 end

0 comments on commit 2957c96

Please sign in to comment.
Something went wrong with that request. Please try again.