<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<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&#039;s better than toast? Crunchytoast!</description>
	<lastBuildDate>Wed, 25 Jan 2012 02:55:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: admin</title>
		<link>http://crunchytoast.com/2009/02/15/return-to-acts_as_taggable_on/#comment-6</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-6</guid>
		<description>Hi Greg. This is not currently possible. The query options for the plugin allow only one &quot;on&quot; option.
The plugin could be extended to support multiple &quot;contexts&quot;, 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&#039;, :on =&gt; ‘foo’}, {’b&#039;, :on =&gt; ‘bar’} })&lt;/code&gt;

If you don&#039;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(&#039;a&#039;, :on =&gt; &#039;foo&#039;)
@query2 = MyRec.find_tagged_with(&#039;b&#039;, :on =&gt; &#039;bar&#039;)

#And in your view
&lt;%for myquery in {@query1, @query2} do %&gt;
&#160;&#160;&lt;% for myrec in myquery do %&gt;
&#160;&#160;&#160;&#160;&lt;% if myrec.tag_type == &quot;foo&quot; %&gt;
&#160;&#160;&#160;&#160;&#160;Foo tag: &lt;% myrec.name %&gt;
&#160;&#160;&#160;&#160;&lt;% elsif myrec.tag_type == &quot;bar&quot; %&gt;
&#160;&#160;&#160;&#160;&#160;Bar tag: &lt;% myrec.name %&gt;
&#160;&#160;&#160;&#160;&lt;% end %&gt;
&#160;&#160;&lt;% end %&gt;
&lt;% end %&gt;&lt;/code&gt;

BTW, the &quot;tag_type&quot; field is a &quot;placebo&quot; for the real variable,
which I can&#039;t think of right now. I&#039;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', <img src='http://crunchytoast.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> n =&gt; ‘foo’}, {’b', <img src='http://crunchytoast.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> n =&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', <img src='http://crunchytoast.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> n =&gt; 'foo')<br />
@query2 = MyRec.find_tagged_with('b', <img src='http://crunchytoast.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> n =&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-5</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-5</guid>
		<description>It&#039;d be extremely useful to me to understand how to do a

rec.find_tagged_with( (&#039;a&#039;, :on =&gt; &#039;foo&#039;) AND (&#039;b&#039;, :on =&gt; &#039;bar&#039;))

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( (&#8216;a&#8217;, <img src='http://crunchytoast.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> n =&gt; &#8216;foo&#8217;) AND (&#8216;b&#8217;, <img src='http://crunchytoast.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> n =&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-4</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-4</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>

