<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>So Many Fish &#187; Rails</title>
	<atom:link href="http://www.lisasawin.com/category/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lisasawin.com</link>
	<description>...which is pretty cool when you think about it...</description>
	<lastBuildDate>Fri, 26 Aug 2011 01:16:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Search Form restricted to particular node type, in a block.</title>
		<link>http://www.lisasawin.com/2010/04/27/search-form-restricted-to-particular-node-type-in-a-block/</link>
		<comments>http://www.lisasawin.com/2010/04/27/search-form-restricted-to-particular-node-type-in-a-block/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 17:25:55 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=135</guid>
		<description><![CDATA[A site I&#8217;m working on has quite a few search forms. Basically, for each of the node types, we want to give the user an easy option to restrict search to only that type, ie events, blog posts, as well as a few custom content types. Sometimes the node types will be presented by taxonomy [...]]]></description>
			<content:encoded><![CDATA[<p>A site I&#8217;m working on has quite a few search forms.  Basically, for each of the node types, we want to give the user an easy option to restrict search to only that type, ie events, blog posts, as well as a few custom content types.  Sometimes the node types will be presented by taxonomy term, so that the user should be able to easily search through events tagged &#8220;toddler,&#8221; for example.  Here&#8217;s how to construct these search boxes and place them into blocks.</p>
<p>First, construct a view which lists all of the content you&#8217;d like to search together.  For example, I&#8217;ve created a view called Event List.  In it, I filter based on node type == event.  I add another filter from the Search group, &#8220;Search:  Search Terms&#8221;.  This filter is exposed and optional.  On &#8220;empty input&#8221;, select &#8220;Show All&#8221;.  I created an argument for the taxonomy term and also choose a few fields.  Then, I created a page view and gave it the path &#8220;events/%&#8221;.  In the Basic Settings fieldset, change the setting &#8220;Exposed form in block&#8221; to &#8220;yes.&#8221;   Save!</p>
<p>Now, when you go to the Blocks page, you&#8217;ll see a block called &#8220;Exposed form:  Events-page_1&#8243; (or something nicer if you name your page).  You can just drag it to a sidebar for testing, but later on you&#8217;ll probably want to restrict where this block appears.  </p>
<p>When the block is displayed on /events/all, it searches all events.  When it is displayed on events/toddlers, it only searches within events tagged toddlers.  Just what we wanted.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2010/04/27/search-form-restricted-to-particular-node-type-in-a-block/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using Context and Menu Trail to establish subnavigation by taxonomy term</title>
		<link>http://www.lisasawin.com/2010/04/22/using-context-and-menu-trail-to-establish-subnavigation-by-taxonomy-term/</link>
		<comments>http://www.lisasawin.com/2010/04/22/using-context-and-menu-trail-to-establish-subnavigation-by-taxonomy-term/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 23:51:27 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=129</guid>
		<description><![CDATA[Context is a great module, but the settings page is a little misleading. You can set a context to operate when a node tagged with a term. You can set as a reaction that one of your menu items is made active. However, when you navigate to the page for that node with the menu [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://drupal.org/project/context">Context</a> is a great module, but the settings page is a little misleading.  You can set a context to operate when a node tagged with a term.  You can set as a reaction that one of your menu items is made active.  However, when you navigate to the page for that node with the menu loaded into a block, the active item is not indicated.  Works fine if the menu is on the main part of the page, but not in a block.  This is true for any menu &#8212; primary, secondary or custom.</p>
<p>We&#8217;re working on a site which has the subnavigation in a sidebar.  It&#8217;s going to be used in a lot of different ways, but the simplest use case on this site is a blog, split into four categories.  Each category will be treated as its own mini-blog. The four categories will be in the sidebar.  When you&#8217;re viewing a post in the Book blog, then the Book link should be active in the sidebar.  </p>
<p>It turns out this is really easy to do if you use <a href="http://drupal.org/project/menutrails">Menu Trails</a>, in addition to Context.  Let context set up the display of the block holding the menu, but then associate each category with the correct menu item in Menu Trail.  Together, they will present the menu when you want it and highlight the correct link.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2010/04/22/using-context-and-menu-trail-to-establish-subnavigation-by-taxonomy-term/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Viewing multiple domains hosted via vhost on other computers</title>
		<link>http://www.lisasawin.com/2009/10/07/viewing-multiple-domains-hosted-via-vhost-on-other-computers/</link>
		<comments>http://www.lisasawin.com/2009/10/07/viewing-multiple-domains-hosted-via-vhost-on-other-computers/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 19:59:58 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[rails hosting]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=14</guid>
		<description><![CDATA[I followed this excellent screencast on setting up Phusion Passenger and all was running well. I can now develop multiple Rails apps simultaneously without starting/stopping my WebBrick server, which I love. But how to view these apps from my networked PC&#8217;s? All it took was an entry in the hosts file, which is here by [...]]]></description>
			<content:encoded><![CDATA[<p>I followed <a href='http://peepcode.com/products/phusion-passenger'>this excellent screencast on setting up Phusion Passenger</a> and all was running well.  I can now develop multiple Rails apps simultaneously without starting/stopping my WebBrick server, which I love.  But how to view these apps from my networked PC&#8217;s?  All it took was an entry in the hosts file, which is here by default on both XP and Vista:</p>
<p>%SystemRoot%\system32\drivers\etc\</p>
<p><a href='http://en.wikipedia.org/wiki/Hosts_file#Location_and_content'>Thanks, Wikipedia!</a>  Now, on both my development machine and my others, I can use addresses like app.local to see work in progress.</p>
<p>One additional point:  in your Rails apps,  puts will write to your Apache error log, which may be located here:  /var/log/apache2/error_log.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2009/10/07/viewing-multiple-domains-hosted-via-vhost-on-other-computers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Privacy, caching and making Safari behave</title>
		<link>http://www.lisasawin.com/2008/08/17/privacy-caching-and-making-safari-behave/</link>
		<comments>http://www.lisasawin.com/2008/08/17/privacy-caching-and-making-safari-behave/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 17:01:22 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.lisasawin.com/?p=9</guid>
		<description><![CDATA[One of the sites I&#8217;m working on has health related information, which is very important to keep private. In particular, after the user logs out, we have to make its pages unavailable via the Back button. it took some work to convince all browsers we meant it, but here&#8217;s what works for Safari 3, Firefox [...]]]></description>
			<content:encoded><![CDATA[<p>One of the sites I&#8217;m working on has health related information, which is very important to keep private.  In particular, after the user logs out, we have to make its pages unavailable via the Back button.  it took some work to convince all browsers we meant it, but here&#8217;s what works for Safari 3, Firefox 2 &amp; 3 (Mac OS 10.4 Intel), IE 7, Firefox 2 &amp; 3 (Win XP and Vista), IE 6 (Win 2K):</p>
<p>Set the response headers in an after_filter:</p>
<blockquote><p>
def set_header<br />
   #Date in the past<br />
   headers["Expires"] = &#8220;Mon, 26 Jul 1997 05:00:00 GMT&#8221;<br />
   #always modified<br />
   headers["Last-Modified"] = &#8220;Mon, 26 Jul 1997 05:00:00 GMT&#8221;<br />
   headers["Cache-Control"] = &#8220;no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0&#8243;<br />
   #HTTP/1.0<br />
   headers["Pragma"] = &#8220;no-cache&#8221;<br />
 end<br />
</blockquote >
To make Safari behave, add this to all pages:</p>
<blockquote><p>
&lt;iframe style=&#8221;height:0px;width:0px;visibility:hidden&#8221; src=&#8221;about:blank&#8221;&gt;<br />
This frame prevents back forward cache in Safari.<br />
&lt;/iframe&gt;<br />
</blockquote >
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2008/08/17/privacy-caching-and-making-safari-behave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Started</title>
		<link>http://www.lisasawin.com/2008/05/19/getting-started/</link>
		<comments>http://www.lisasawin.com/2008/05/19/getting-started/#comments</comments>
		<pubDate>Mon, 19 May 2008 11:24:35 +0000</pubDate>
		<dc:creator>somanyfish</dc:creator>
				<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://lisasawin.com/?p=3</guid>
		<description><![CDATA[A blog has seemed like a good idea for a long time.  Now I’m getting started. Getting it up and running with Typo hosted by HostingRails was a snap.  I was a little concerned that fastcgi would be a problem, since the Typo install page didn’t mention it up front.  Down the page was info on [...]]]></description>
			<content:encoded><![CDATA[<p>A blog has seemed like a good idea for a long time.  Now I’m getting started.</p>
<p>Getting it up and running with Typo hosted by HostingRails was a snap.  I was a little concerned that fastcgi would be a problem, since the <a href="http://typosphere.org/2007/08/26/install-typo"><span><strong>Typo install page</strong></span></a> didn’t mention it up front.  Down the page was info on how to make it work, but it seemed like there might be some hitches.  The excellent forums over a HostingRails <a href="http://www.hostingrails.com/forums/wiki_thread/3"><span><strong>mentioned</strong></span></a>:</p>
<p>If you don’t have dedicated memory with your account you need instead just download the typo.tgz and install it like any other rails application.</p>
<p>So, I just downloaded typo.tgz and followed the <a href="http://www.hostingrails.com/forums/wiki_thread/1"><span><strong>regular tutorial</strong></span></a> on getting a Rails app deployed.  It worked perfectly!  Now I just need to figure out the whole caching thing, which may or may not be a problem with typo via fastcgi.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lisasawin.com/2008/05/19/getting-started/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

