Browse files

Let's not set a variable name to be a common Ruby method name.

  • Loading branch information...
1 parent c653a0e commit b88fe326921b00b6a43c26e590b198d4e30e2479 @pat pat committed Dec 30, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 ts/en/common_issues.textile
View
4 ts/en/common_issues.textile
@@ -257,9 +257,9 @@ It is possible to filter on attributes using OR logic - although you need to be
There's two steps to it... firstly, you need to create a computed attribute while searching, using Sphinx's select option, and then filter by that computed value. Here's an example where we want to return all publicly visible articles, as well as articles belonging to the user with an ID of 5.
{% highlight ruby %}
-select = "*, IF(visible = 1 OR user_id = 5, 1, 0) AS display"
+with_display = "*, IF(visible = 1 OR user_id = 5, 1, 0) AS display"
Article.search 'pancakes',
- :sphinx_select => select,
+ :sphinx_select => with_display,
:with => {'display' => 1}
{% endhighlight %}

0 comments on commit b88fe32

Please sign in to comment.