<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	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"
	>
<channel>
	<title>Comments on: Return to acts_as_taggable_on</title>
	<atom:link href="http://crunchytoast.com/2009/02/15/return-to-acts_as_taggable_on/feed/" rel="self" type="application/rss+xml" />
	<link>http://crunchytoast.com/2009/02/15/return-to-acts_as_taggable_on/</link>
	<description>What's better than toast? Crunchytoast!</description>
	<pubDate>Sat, 13 Mar 2010 18:50:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: admin</title>
		<link>http://crunchytoast.com/2009/02/15/return-to-acts_as_taggable_on/#comment-28</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 16 Mar 2009 03:24:03 +0000</pubDate>
		<guid isPermaLink="false">http://crunchytoast.com/?p=17#comment-28</guid>
		<description>Hi Greg. This is not currently possible. The query options for the plugin allow only one "on" option.
The plugin could be extended to support multiple "contexts", although this would raise the complexity in a number of places. Also the syntax would probably be more like this.

&lt;code&gt;rec.find_tagged_with({ {’a', :on =&#62; ‘foo’}, {’b', :on =&#62; ‘bar’} })&lt;/code&gt;

If you don't mind running two queries, it is easy enough to each result set in your view.
Here is an example...

&lt;code&gt;#In your controller
@query1 = MyRec.find_tagged_with('a', :on =&#62; 'foo')
@query2 = MyRec.find_tagged_with('b', :on =&#62; 'bar')

#And in your view
&#60;%for myquery in {@query1, @query2} do %&#62;
&#160;&#160;&#60;% for myrec in myquery do %&#62;
&#160;&#160;&#160;&#160;&#60;% if myrec.tag_type == "foo" %&#62;
&#160;&#160;&#160;&#160;&#160;Foo tag: &#60;% myrec.name %&#62;
&#160;&#160;&#160;&#160;&#60;% elsif myrec.tag_type == "bar" %&#62;
&#160;&#160;&#160;&#160;&#160;Bar tag: &#60;% myrec.name %&#62;
&#160;&#160;&#160;&#160;&#60;% end %&#62;
&#160;&#160;&#60;% end %&#62;
&#60;% end %&#62;&lt;/code&gt;

BTW, the "tag_type" field is a "placebo" for the real variable, 
which I can't think of right now. I'll fix this comment when I get 
a chance.</description>
		<content:encoded><![CDATA[<p>Hi Greg. This is not currently possible. The query options for the plugin allow only one &#8220;on&#8221; option.<br />
The plugin could be extended to support multiple &#8220;contexts&#8221;, although this would raise the complexity in a number of places. Also the syntax would probably be more like this.</p>
<p><code>rec.find_tagged_with({ {’a', :on =&gt; ‘foo’}, {’b', :on =&gt; ‘bar’} })</code></p>
<p>If you don&#8217;t mind running two queries, it is easy enough to each result set in your view.<br />
Here is an example&#8230;</p>
<p><code>#In your controller<br />
@query1 = MyRec.find_tagged_with('a', :on =&gt; 'foo')<br />
@query2 = MyRec.find_tagged_with('b', :on =&gt; 'bar')</p>
<p>#And in your view<br />
&lt;%for myquery in {@query1, @query2} do %&gt;<br />
&nbsp;&nbsp;&lt;% for myrec in myquery do %&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;% if myrec.tag_type == "foo" %&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Foo tag: &lt;% myrec.name %&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;% elsif myrec.tag_type == "bar" %&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Bar tag: &lt;% myrec.name %&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&lt;% end %&gt;<br />
&nbsp;&nbsp;&lt;% end %&gt;<br />
&lt;% end %&gt;</code></p>
<p>BTW, the &#8220;tag_type&#8221; field is a &#8220;placebo&#8221; for the real variable,<br />
which I can&#8217;t think of right now. I&#8217;ll fix this comment when I get<br />
a chance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GregM</title>
		<link>http://crunchytoast.com/2009/02/15/return-to-acts_as_taggable_on/#comment-25</link>
		<dc:creator>GregM</dc:creator>
		<pubDate>Sun, 15 Mar 2009 21:58:27 +0000</pubDate>
		<guid isPermaLink="false">http://crunchytoast.com/?p=17#comment-25</guid>
		<description>It'd be extremely useful to me to understand how to do a

rec.find_tagged_with( ('a', :on =&#62; 'foo') AND ('b', :on =&#62; 'bar'))

To say that the documentation is sparse is charitable.

Thanks</description>
		<content:encoded><![CDATA[<p>It&#8217;d be extremely useful to me to understand how to do a</p>
<p>rec.find_tagged_with( (&#8217;a', :on =&gt; &#8216;foo&#8217;) AND (&#8217;b', :on =&gt; &#8216;bar&#8217;))</p>
<p>To say that the documentation is sparse is charitable.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ancor Cruz &#187; Funcionalidades &#8220;ocultas&#8221; de acts_as_taggable_on</title>
		<link>http://crunchytoast.com/2009/02/15/return-to-acts_as_taggable_on/#comment-13</link>
		<dc:creator>Ancor Cruz &#187; Funcionalidades &#8220;ocultas&#8221; de acts_as_taggable_on</dc:creator>
		<pubDate>Mon, 09 Mar 2009 12:26:26 +0000</pubDate>
		<guid isPermaLink="false">http://crunchytoast.com/?p=17#comment-13</guid>
		<description>[...] sacar del plugin un comportamiento no descrito en la documentación, que encontraba por la web, obtener un listado con todas las aplicaciones que estuvieran tageadas con todos los [...]</description>
		<content:encoded><![CDATA[<p>[...] sacar del plugin un comportamiento no descrito en la documentación, que encontraba por la web, obtener un listado con todas las aplicaciones que estuvieran tageadas con todos los [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
