<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" version="2.0">
<channel>
	<title>Comments for metautonomo.us</title>
	
	<link>http://metautonomo.us</link>
	<description>&lt;strong&gt;meta-&lt;/strong&gt; &gt; &lt;em&gt;one level of description up&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;autonomy&lt;/strong&gt; &gt; &lt;em&gt;independence; self-direction&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;metautonomous&lt;/strong&gt; &gt; &lt;em&gt;autonomous through code&lt;/em&gt;</description>
	<lastBuildDate>Tue, 07 Sep 2010 02:59:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/metautonomous-comments" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="metautonomous-comments" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Comment on ActiveRecord::Relation vs Arel by fabian</title>
		<link>http://metautonomo.us/2010/05/11/activerecord-relation-vs-arel/comment-page-1/#comment-428</link>
		<dc:creator>fabian</dc:creator>
		<pubDate>Tue, 07 Sep 2010 02:59:55 +0000</pubDate>
		<guid isPermaLink="false">http://metautonomo.us/?p=359#comment-428</guid>
		<description>very good post, I myself am trying to learn my way around ActiveRecord but I want to postpone going into Arel in great depth.  This kind of info on Arel as used in ActiveRecord really helps me out.</description>
		<content:encoded><![CDATA[<p>very good post, I myself am trying to learn my way around ActiveRecord but I want to postpone going into Arel in great depth.  This kind of info on Arel as used in ActiveRecord really helps me out.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/FUoUwtt4Ai8wsnVYs9EqmRMQ-1E/0/da"><img src="http://feedads.g.doubleclick.net/~a/FUoUwtt4Ai8wsnVYs9EqmRMQ-1E/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/FUoUwtt4Ai8wsnVYs9EqmRMQ-1E/1/da"><img src="http://feedads.g.doubleclick.net/~a/FUoUwtt4Ai8wsnVYs9EqmRMQ-1E/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Uploadify and Rails 3 by Uploadify onComplete Wouldn’t Fire Until I Swore – A Lot | Nobody Listens Anyway</title>
		<link>http://metautonomo.us/2010/07/09/uploadify-and-rails-3/comment-page-1/#comment-425</link>
		<dc:creator>Uploadify onComplete Wouldn’t Fire Until I Swore – A Lot | Nobody Listens Anyway</dc:creator>
		<pubDate>Fri, 03 Sep 2010 07:18:38 +0000</pubDate>
		<guid isPermaLink="false">http://metautonomo.us/?p=451#comment-425</guid>
		<description>[...] As an aside I should mention that if you need help getting uploadify running in your Rails application there's already a couple of great tutorials. One by John Nunemaker and an update to get it working with Rails 3 updated version. [...]</description>
		<content:encoded><![CDATA[<p>[...] As an aside I should mention that if you need help getting uploadify running in your Rails application there&#039;s already a couple of great tutorials. One by John Nunemaker and an update to get it working with Rails 3 updated version. [...]</p>

<p><a href="http://feedads.g.doubleclick.net/~a/_xLJgjdIicUjss79wEZjYuNxzHA/0/da"><img src="http://feedads.g.doubleclick.net/~a/_xLJgjdIicUjss79wEZjYuNxzHA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/_xLJgjdIicUjss79wEZjYuNxzHA/1/da"><img src="http://feedads.g.doubleclick.net/~a/_xLJgjdIicUjss79wEZjYuNxzHA/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on MetaSearch, Object-based searching for Rails 3 by Dan Jantea</title>
		<link>http://metautonomo.us/2010/03/07/metasearch-object-based-searching-for-rails-3/comment-page-1/#comment-423</link>
		<dc:creator>Dan Jantea</dc:creator>
		<pubDate>Mon, 30 Aug 2010 12:48:45 +0000</pubDate>
		<guid isPermaLink="false">http://metautonomo.us/?p=155#comment-423</guid>
		<description>I must admit that I do not know how to post code here. Neither &lt;code&gt;...&lt;/code&gt; or &lt;code&gt;&lt;pre&gt;...&lt;/pre&gt;&lt;/code&gt; worked.</description>
		<content:encoded><![CDATA[<p>I must admit that I do not know how to post code here. Neither <code>...</code> or <code>
<pre>...</pre>
<p></code> worked.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/LbK4MOkT7xuqwH6lBo_DmxpVZJs/0/da"><img src="http://feedads.g.doubleclick.net/~a/LbK4MOkT7xuqwH6lBo_DmxpVZJs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/LbK4MOkT7xuqwH6lBo_DmxpVZJs/1/da"><img src="http://feedads.g.doubleclick.net/~a/LbK4MOkT7xuqwH6lBo_DmxpVZJs/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on MetaSearch, Object-based searching for Rails 3 by Dan Jantea</title>
		<link>http://metautonomo.us/2010/03/07/metasearch-object-based-searching-for-rails-3/comment-page-1/#comment-422</link>
		<dc:creator>Dan Jantea</dc:creator>
		<pubDate>Mon, 30 Aug 2010 12:46:39 +0000</pubDate>
		<guid isPermaLink="false">http://metautonomo.us/?p=155#comment-422</guid>
		<description>Ernie,

Thank you for the prompt response. Your approach is similar to the one that I had in mind. Here's how it worked:

app/models/task.rb:
&lt;code&gt;&lt;pre&gt;
class Task  false, :type =&gt; :integer
end
&lt;/pre&gt;&lt;/code&gt;

app/views/tasks/index.html.erb
&lt;code&gt;&lt;pre&gt;
 {:method =&gt; :get} do |f| %&gt;
  
  
   true}, 0, nil %&gt;
   
  
      
  
  

&lt;/pre&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Ernie,</p>
<p>Thank you for the prompt response. Your approach is similar to the one that I had in mind. Here&#8217;s how it worked:</p>
<p>app/models/task.rb:<br />
<code>
<pre>
class Task  false, :type =&gt; :integer
end
</pre>
<p></code></p>
<p>app/views/tasks/index.html.erb<br />
<code>
<pre>
 {:method =&gt; :get} do |f| %&gt;

   true}, 0, nil %&gt;
</pre>
<p></code></p>

<p><a href="http://feedads.g.doubleclick.net/~a/090_j4Lfs9lB5H8uk01YaCfkuJc/0/da"><img src="http://feedads.g.doubleclick.net/~a/090_j4Lfs9lB5H8uk01YaCfkuJc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/090_j4Lfs9lB5H8uk01YaCfkuJc/1/da"><img src="http://feedads.g.doubleclick.net/~a/090_j4Lfs9lB5H8uk01YaCfkuJc/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why MetaWhere 0.9.2 raises errors (and why you’ll thank me later) by okr</title>
		<link>http://metautonomo.us/2010/08/26/why-metawhere-0-9-2-raises-errors-and-why-youll-thank-me-later/comment-page-1/#comment-421</link>
		<dc:creator>okr</dc:creator>
		<pubDate>Sun, 29 Aug 2010 21:56:30 +0000</pubDate>
		<guid isPermaLink="false">http://metautonomo.us/?p=511#comment-421</guid>
		<description>Thank you for your quick reply!

It does sound like I need to use an include (left join) and then just select the unique entries it returns.  I'm probably not doing this correctly (couldn't find much info on using includes in named scopes).

I changed my scope to...

&lt;code&gt;
scope :contains_string, lambda {|str| where(:title.matches % "%#{str}%" | :body.matches % "%#{str}%" | :tags =&gt; [:name.matches % "%#{str}%"]).includes(:tags)}
&lt;/code&gt;

which gives me the following error...

undefined method `to_sym' for #;</description>
		<content:encoded><![CDATA[<p>Thank you for your quick reply!</p>
<p>It does sound like I need to use an include (left join) and then just select the unique entries it returns.  I&#8217;m probably not doing this correctly (couldn&#8217;t find much info on using includes in named scopes).</p>
<p>I changed my scope to&#8230;</p>
<p><code><br />
scope :contains_string, lambda {|str| where(:title.matches % "%#{str}%" | :body.matches % "%#{str}%" | :tags =&gt; [:name.matches % "%#{str}%"]).includes(:tags)}<br />
</code></p>
<p>which gives me the following error&#8230;</p>
<p>undefined method `to_sym&#8217; for #;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/EkBLXpe3Cm492-HaqqiZ-z6moQc/0/da"><img src="http://feedads.g.doubleclick.net/~a/EkBLXpe3Cm492-HaqqiZ-z6moQc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/EkBLXpe3Cm492-HaqqiZ-z6moQc/1/da"><img src="http://feedads.g.doubleclick.net/~a/EkBLXpe3Cm492-HaqqiZ-z6moQc/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why MetaWhere 0.9.2 raises errors (and why you’ll thank me later) by Ernie</title>
		<link>http://metautonomo.us/2010/08/26/why-metawhere-0-9-2-raises-errors-and-why-youll-thank-me-later/comment-page-1/#comment-420</link>
		<dc:creator>Ernie</dc:creator>
		<pubDate>Sun, 29 Aug 2010 20:19:21 +0000</pubDate>
		<guid isPermaLink="false">http://metautonomo.us/?p=511#comment-420</guid>
		<description>Thanks for the kind words. Glad you're enjoying both gems! I think there may be some confusion regarding the source of the problem. All autojoin does (did) is what you changed it to, anyway. The problem is that those joins are always inner joins, which require a match on both sides of the association. You could try an include to do a left join instead, but then you are also loading the associated objects which may not be what you want.</description>
		<content:encoded><![CDATA[<p>Thanks for the kind words. Glad you&#8217;re enjoying both gems! I think there may be some confusion regarding the source of the problem. All autojoin does (did) is what you changed it to, anyway. The problem is that those joins are always inner joins, which require a match on both sides of the association. You could try an include to do a left join instead, but then you are also loading the associated objects which may not be what you want.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/enAK2s8ctPgasB2eSPrVNgU8p9s/0/da"><img src="http://feedads.g.doubleclick.net/~a/enAK2s8ctPgasB2eSPrVNgU8p9s/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/enAK2s8ctPgasB2eSPrVNgU8p9s/1/da"><img src="http://feedads.g.doubleclick.net/~a/enAK2s8ctPgasB2eSPrVNgU8p9s/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why MetaWhere 0.9.2 raises errors (and why you’ll thank me later) by okr</title>
		<link>http://metautonomo.us/2010/08/26/why-metawhere-0-9-2-raises-errors-and-why-youll-thank-me-later/comment-page-1/#comment-419</link>
		<dc:creator>okr</dc:creator>
		<pubDate>Sun, 29 Aug 2010 19:07:31 +0000</pubDate>
		<guid isPermaLink="false">http://metautonomo.us/?p=511#comment-419</guid>
		<description>Hey, first of all, thank you for your wonderful software!  I recently updated to the new versions of meta_where and meta_search.  Previously I had a "where" scope that i used in a meta_search function as follows...

&lt;code&gt;
scope :contains_string, lambda {|str| where(:title.matches % "%#{str}%" | :body.matches % "%#{str}%" | :tags =&gt; [:name.matches % "%#{str}%"]).autojoin}

search_methods :contains_string
&lt;/code&gt;

which was used in a search method to filter objects in a Post model (that uses acts_as_taggable_on for tagging).  Before I could search with a string like "welcome" and it would return any post object that had that string in their title, body or tag, even if the object's tag_list was empty.

with the new version of meta_where that removes the autojoin method I changed my code to...

&lt;code&gt;
scope :contains_string, lambda {|str| where(:title.matches % "%#{str}%" | :body.matches % "%#{str}%" | :tags =&gt; [:name.matches % "%#{str}%"]).joins(:tags)}

search_methods :contains_string
&lt;/code&gt;

Now if i search for that same string it will only respond with Post objects that do not have an empty tag_list.  I'm sorry for the long comment, I wasn't sure if this was a bug or if I have my syntax wrong (I guess I'm approaching this a bit like a newbie since I was using that autojoin method before).  Maybe I need to use something like thinking sphinx for a text search like this?

Any help would be greatly appreciated.</description>
		<content:encoded><![CDATA[<p>Hey, first of all, thank you for your wonderful software!  I recently updated to the new versions of meta_where and meta_search.  Previously I had a &#8220;where&#8221; scope that i used in a meta_search function as follows&#8230;</p>
<p><code><br />
scope :contains_string, lambda {|str| where(:title.matches % "%#{str}%" | :body.matches % "%#{str}%" | :tags =&gt; [:name.matches % "%#{str}%"]).autojoin}</p>
<p>search_methods :contains_string<br />
</code></p>
<p>which was used in a search method to filter objects in a Post model (that uses acts_as_taggable_on for tagging).  Before I could search with a string like &#8220;welcome&#8221; and it would return any post object that had that string in their title, body or tag, even if the object&#8217;s tag_list was empty.</p>
<p>with the new version of meta_where that removes the autojoin method I changed my code to&#8230;</p>
<p><code><br />
scope :contains_string, lambda {|str| where(:title.matches % "%#{str}%" | :body.matches % "%#{str}%" | :tags =&gt; [:name.matches % "%#{str}%"]).joins(:tags)}</p>
<p>search_methods :contains_string<br />
</code></p>
<p>Now if i search for that same string it will only respond with Post objects that do not have an empty tag_list.  I&#8217;m sorry for the long comment, I wasn&#8217;t sure if this was a bug or if I have my syntax wrong (I guess I&#8217;m approaching this a bit like a newbie since I was using that autojoin method before).  Maybe I need to use something like thinking sphinx for a text search like this?</p>
<p>Any help would be greatly appreciated.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/Dm-A8Z67RSHFE0x2UtlCXA42h1Q/0/da"><img src="http://feedads.g.doubleclick.net/~a/Dm-A8Z67RSHFE0x2UtlCXA42h1Q/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Dm-A8Z67RSHFE0x2UtlCXA42h1Q/1/da"><img src="http://feedads.g.doubleclick.net/~a/Dm-A8Z67RSHFE0x2UtlCXA42h1Q/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on MetaSearch, Object-based searching for Rails 3 by Ernie</title>
		<link>http://metautonomo.us/2010/03/07/metasearch-object-based-searching-for-rails-3/comment-page-1/#comment-416</link>
		<dc:creator>Ernie</dc:creator>
		<pubDate>Fri, 27 Aug 2010 13:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://metautonomo.us/?p=155#comment-416</guid>
		<description>Dan,

Set the value for your "null" checkbox to 0, and then do something like this  (warning: completely untested, but this should get you close):

&lt;code&gt;&lt;pre lang="rails"&gt;
scope :in_any_of_categories, lambda { |category_ids|
  ids = category_ids.compact # drop nils since IN (NULL) is invalid SQL
  include_null = ids.delete(0)
  if include_null &amp;&amp; ids.any?
    where("category_id IN (?) OR category_id IS NULL", ids)
  elsif ids.any?
    where("category_id IN (?)", ids)
  elsif include_null
    where("category_id IS NULL")
  else # Somehow we got nothing in the array
    self
  end
}
&lt;/pre&gt;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Dan,</p>
<p>Set the value for your &#8220;null&#8221; checkbox to 0, and then do something like this  (warning: completely untested, but this should get you close):</p>
<p><code></p>

<div class="wp_syntax"><div class="code"><pre class="rails" style="font-family:monospace;">scope <span style="color:#ff3333; font-weight:bold;">:in_any_of_categories</span>, <span style="color:#CC0066; font-weight:bold;">lambda</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>category_ids<span style="color:#006600; font-weight:bold;">|</span>
  ids = category_ids.<span style="color:#9900CC;">compact</span> <span style="color:#008000; font-style:italic;"># drop nils since IN (NULL) is invalid SQL</span>
  include_null = ids.<span style="color:#5A0A0A; font-weight:bold;">delete</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> include_null <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> ids.<span style="color:#9900CC;">any</span>?
    where<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;category_id IN (?) OR category_id IS NULL&quot;</span>, ids<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">elsif</span> ids.<span style="color:#9900CC;">any</span>?
    where<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;category_id IN (?)&quot;</span>, ids<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">elsif</span> include_null
    where<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;category_id IS NULL&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">else</span> <span style="color:#008000; font-style:italic;"># Somehow we got nothing in the array</span>
    <span style="color:#0000FF; font-weight:bold;">self</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#006600; font-weight:bold;">&#125;</span></pre></div></div>

<p></code></p>

<p><a href="http://feedads.g.doubleclick.net/~a/w6JGn2Wd6W9ZFSJQQBGWrBdUVfw/0/da"><img src="http://feedads.g.doubleclick.net/~a/w6JGn2Wd6W9ZFSJQQBGWrBdUVfw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/w6JGn2Wd6W9ZFSJQQBGWrBdUVfw/1/da"><img src="http://feedads.g.doubleclick.net/~a/w6JGn2Wd6W9ZFSJQQBGWrBdUVfw/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on MetaSearch, Object-based searching for Rails 3 by Dan Jantea</title>
		<link>http://metautonomo.us/2010/03/07/metasearch-object-based-searching-for-rails-3/comment-page-1/#comment-415</link>
		<dc:creator>Dan Jantea</dc:creator>
		<pubDate>Fri, 27 Aug 2010 12:52:31 +0000</pubDate>
		<guid isPermaLink="false">http://metautonomo.us/?p=155#comment-415</guid>
		<description>Thank you Ernie, you are right, the problem was that the parameters were strings, and :type =&gt; :integer solved the problem.

As you figured out, i want to give the user the possibility to search the tasks which belong to the category or categories that she selects from the list of category check boxes. This works fine, but i want to add one more check box to the list of category check boxes for searching those tasks which are in no category (their category_id is null in the database). The user should be able to check any of the check boxes (the special "No category" one or any other category, in any combination). So the resulting SQL would be something like:
- ".... ( category_id IS NULL OR category_id in (1,7) )" if the user selects the "No category" and categories 1 and 7, or
- ".... category_id in (1,7)" if she selects categories 1 and 7, or
- ".... category_id IS NULL" if the selects just the "No category"

I wasn't yet able to combine the two conditions - the "category_id IS NULL" and the "category_id in (....)". Any suggestions?

I am aware of the alternative approach of simply defining the "No category" category in the database and use its specific id as any other category_id instead of using NULL for TASK.CATEGORY_ID. I am trying to explore all possibilities before, though. Is it possible to use meta_search in a scenario like this (mixing IS NULL with other SQL predicates as search criteria for the same database column)?</description>
		<content:encoded><![CDATA[<p>Thank you Ernie, you are right, the problem was that the parameters were strings, and :type =&gt; :integer solved the problem.</p>
<p>As you figured out, i want to give the user the possibility to search the tasks which belong to the category or categories that she selects from the list of category check boxes. This works fine, but i want to add one more check box to the list of category check boxes for searching those tasks which are in no category (their category_id is null in the database). The user should be able to check any of the check boxes (the special &#8220;No category&#8221; one or any other category, in any combination). So the resulting SQL would be something like:<br />
- &#8220;&#8230;. ( category_id IS NULL OR category_id in (1,7) )&#8221; if the user selects the &#8220;No category&#8221; and categories 1 and 7, or<br />
- &#8220;&#8230;. category_id in (1,7)&#8221; if she selects categories 1 and 7, or<br />
- &#8220;&#8230;. category_id IS NULL&#8221; if the selects just the &#8220;No category&#8221;</p>
<p>I wasn&#8217;t yet able to combine the two conditions &#8211; the &#8220;category_id IS NULL&#8221; and the &#8220;category_id in (&#8230;.)&#8221;. Any suggestions?</p>
<p>I am aware of the alternative approach of simply defining the &#8220;No category&#8221; category in the database and use its specific id as any other category_id instead of using NULL for TASK.CATEGORY_ID. I am trying to explore all possibilities before, though. Is it possible to use meta_search in a scenario like this (mixing IS NULL with other SQL predicates as search criteria for the same database column)?</p>

<p><a href="http://feedads.g.doubleclick.net/~a/LQyv3X7Nkhauz9793ApPU0gB4og/0/da"><img src="http://feedads.g.doubleclick.net/~a/LQyv3X7Nkhauz9793ApPU0gB4og/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/LQyv3X7Nkhauz9793ApPU0gB4og/1/da"><img src="http://feedads.g.doubleclick.net/~a/LQyv3X7Nkhauz9793ApPU0gB4og/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on MetaSearch, Object-based searching for Rails 3 by Ernie</title>
		<link>http://metautonomo.us/2010/03/07/metasearch-object-based-searching-for-rails-3/comment-page-1/#comment-413</link>
		<dc:creator>Ernie</dc:creator>
		<pubDate>Wed, 25 Aug 2010 20:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://metautonomo.us/?p=155#comment-413</guid>
		<description>Dan, I can't seem to see the form part of your code. I assume you're using f.check_boxes or f.collection_check_boxes, though.

Keep in mind that unless you are casting your parameters to integers, they won't technically be equal to the value you are comparing them to in the check box array. What that means is that if you're intending to make the values the user selects become integers, you need to supply the :type option to search_methods:

&lt;tt&gt;search_method :in_any_of_categories, :type =&gt; :integer&lt;/tt&gt;

should do the trick.</description>
		<content:encoded><![CDATA[<p>Dan, I can&#8217;t seem to see the form part of your code. I assume you&#8217;re using f.check_boxes or f.collection_check_boxes, though.</p>
<p>Keep in mind that unless you are casting your parameters to integers, they won&#8217;t technically be equal to the value you are comparing them to in the check box array. What that means is that if you&#8217;re intending to make the values the user selects become integers, you need to supply the :type option to search_methods:</p>
<p><tt>search_method :in_any_of_categories, :type => :integer</tt></p>
<p>should do the trick.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/Dw9nFJxxFloqMxhTJRYhVvGUaKY/0/da"><img src="http://feedads.g.doubleclick.net/~a/Dw9nFJxxFloqMxhTJRYhVvGUaKY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Dw9nFJxxFloqMxhTJRYhVvGUaKY/1/da"><img src="http://feedads.g.doubleclick.net/~a/Dw9nFJxxFloqMxhTJRYhVvGUaKY/1/di" border="0" ismap="true"></img></a></p>]]></content:encoded>
	</item>
</channel>
</rss>
