<?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>upstream agile - software &#187; plugin</title>
	<atom:link href="http://upstre.am/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://upstre.am</link>
	<description></description>
	<lastBuildDate>Mon, 16 Aug 2010 09:07:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Let the text fields grow</title>
		<link>http://upstre.am/2008/09/18/let-the-text-fields-grow/</link>
		<comments>http://upstre.am/2008/09/18/let-the-text-fields-grow/#comments</comments>
		<pubDate>Thu, 18 Sep 2008 20:18:02 +0000</pubDate>
		<dc:creator>Thilo Utke</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[auto growing]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[text area]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/?p=259</guid>
		<description><![CDATA[I find it rather hard to choose the right size for text boxes. They are either to small so that you feel like caged in while writing into them or they are so big that you feel lost in that great white emptiness. These times are past since someone came up with auto expanding text [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://farm3.static.flickr.com/2127/2496729637_138b7290fd.jpg?v=0"><img alt="" src="http://farm3.static.flickr.com/2127/2496729637_138b7290fd.jpg?v=0" title="Fields of Green" class="alignleft" width="250" height="166" /></a>I find it rather hard to choose the right size for text boxes. They are either to small so that you feel like caged in while writing into them or they are so big that you feel lost in that great white emptiness. These times are past since someone came up with auto expanding text areas (e.g. <a href="http://facebook.com">facebook</a> uses them).  </p>
<p>For one of our <a href="http://kommt-mit.de">rails apps</a> we use John R. Wulff&#8217;s &#8216;<a href="http://github.com/joergbattermann/text_area_with_auto_resize/tree">text_area_with_auto_resize</a>&#8216; plugin. The plugin will give you auto growing text boxes for all text_area calls. I wrote a little <a href="http://upstream-berlin.com/wp-content/uploads/2008/09/inplace_text_area_with_auto_resize.js">extension</a> for prototype&#8217;s (1.6.x) in-place editing text area that makes these text areas auto growing as well. So we can have auto growing text areas all over the place. <img src='http://upstre.am/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://upstre.am/2008/09/18/let-the-text-fields-grow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New plugin: totally restful authorization</title>
		<link>http://upstre.am/2008/06/03/new-plugin-totally-restful-authorization/</link>
		<comments>http://upstre.am/2008/06/03/new-plugin-totally-restful-authorization/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 08:48:38 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[authorization]]></category>
		<category><![CDATA[declarative]]></category>
		<category><![CDATA[dsl]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[transparent]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/06/03/new-plugin-totally-restful-authorization/</guid>
		<description><![CDATA[We have again released a new plugin. Continuing the series of completely original names it&#8217;s called totally restful authorization. The exec summary: you can declaratively add permissions to your (ActiveRecord) models for creating, viewing, updating and destroying them. A set of before filters automagically checks all incoming requests on your restful controllers for the permission [...]]]></description>
			<content:encoded><![CDATA[<p>We have again released a new plugin. Continuing the series of completely original names it&#8217;s called <a href="http://github.com/langalex/totally-restful-authorization">totally restful authorization</a>. </p>
<p><strong>The exec summary:</strong> you can declaratively add permissions to your (ActiveRecord) models for creating, viewing, updating and destroying them. A set of before filters automagically checks all incoming requests on your restful controllers for the permission and grants or denies access based on the permissions declared on the respective model.</p>
<h3>How to install</h3>
<p>Now with Rails 2.1 out all you have to do is <code>script/plugin install git://github.com/langalex/totally-restful-authorization.git</code>. </p>
<h3>How to use</h3>
<p>Include he PermissionCheck Module into the controllers you want to be checked or simply into the ApplicationController to secure your entire application.</p>
<p>class ApplicationController &lt; ActionController::Base<br />
  include PermissionCheck</p>
<p>  &#8230;<br />
end</p>
<p>Second, declare permissions on your model using the built in <a href="http://en.wikipedia.org/wiki/Domain_specific_language">domain specific language</a>.</p>
<p>class User<br />
  updatable_by :admin # updatable if updater.admin? return true<br />
  updatable_by :self, :except => [:admin] # special role self, allow all attributes except some to be updated<br />
  updatable_by :newbie, <img src='http://upstre.am/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> nly => [:description] # only allow some attribute to be updated</p>
<p>  viewable_by :anyone # special role, includes nil</p>
<p>  destroyable_by [:admin, :root] # declare multiple roles at once<br />
end</p>
<p>That&#8217;s it. From now on all requests will be checked against your model permissions and be blocked if the authorization fails. For more details see the <a href="http://github.com/langalex/totally-restful-authorization/tree/master%2FREADME?raw=true">README</a> and the <a href="http://github.com/langalex/totally-restful-authorization/tree/master/test/unit">unit tests</a>. (Btw. if anyone has a good idea on how to replace the controller tests with <a href="http://rspec.info">RSpec</a> specs, i.e. get controller specs working in a plugin please tell me)</p>
]]></content:encoded>
			<wfw:commentRss>http://upstre.am/2008/06/03/new-plugin-totally-restful-authorization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Rails Plugin: social feed</title>
		<link>http://upstre.am/2008/04/25/new-rails-plugin-social-feed/</link>
		<comments>http://upstre.am/2008/04/25/new-rails-plugin-social-feed/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 14:40:35 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[social feed]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/25/new-rails-plugin-social-feed/</guid>
		<description><![CDATA[This is our latest and also largest plugin for ruby on rails so far. After the installation it adds a social feed as seen in the picture to your rails application. The sources have been extracted from autoki which has had a social feed for a couple of months now, so rest assured we have [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right; margin-left:15px;margin-bottom: 15px"><img src='http://upstream-berlin.com/blog/wp-content/uploads/2008/04/socialfeed.png' alt='socialfeed.png' /></div>
<p>This is our latest and also largest plugin for <a href="htp://rubyonrails.org">ruby on rails</a> so far. After the installation it adds a social feed as seen in the picture to your rails application. The sources have been extracted from <a href="http://autoki.de">autoki</a> which has had a social feed for a couple of months now, so rest assured we have put some thoughts into it over time. <img src='http://upstre.am/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Features so far: As a user I can decide what kinds of events I want to see on my social feed and also wether I want to be sent an email when an event occurs. I can also decide wether others will receive a notification on their social feed concerning my own actions.</p>
<p>The plugin includes model extensions for the user, a controller and views for viewing the feed and editing settings as well as a generator to easily create new event types so, getting started only takes a couple of minutes. For more info check out the <a href="http://github.com/langalex/social_feed/tree/master%2FREADME?raw=true">README</a> or <a href="http://github.com/langalex/social_feed/">get the sources from github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://upstre.am/2008/04/25/new-rails-plugin-social-feed/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Rails reporting: dead simple reports now supports excel directly</title>
		<link>http://upstre.am/2008/04/12/rails-reporting-dead-simple-reports-now-supports-excel-directly/</link>
		<comments>http://upstre.am/2008/04/12/rails-reporting-dead-simple-reports-now-supports-excel-directly/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 20:44:14 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[reporting]]></category>
		<category><![CDATA[reports]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/12/rails-reporting-dead-simple-reports-now-supports-excel-directly/</guid>
		<description><![CDATA[dead simple reports is a Ruby on Rails plugin that allows you to create reports from your application data within minutes. As of now it can not only generate HTML tables and CSV files but also M$ Excel spreadsheets. This is possible through the use of the spreadsheet-excel gem. You can grab a copy from [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://upstream-berlin.com/blog/open-source/#dead_simple_reports">dead simple reports</a> is a Ruby on Rails plugin that allows you to create reports from your application data within minutes. As of now it can not only generate HTML tables and CSV files but also M$ Excel spreadsheets. This is possible through the use of the <a href="http://rubyforge.org/projects/spreadsheet/">spreadsheet-excel</a> gem. You can grab a copy from the <a href="http://github.com/langalex/dead_simple_reports">git repository</a> or just <a href="http://github.com/langalex/dead_simple_reports/tarball/master">download it</a> from there.</p>
]]></content:encoded>
			<wfw:commentRss>http://upstre.am/2008/04/12/rails-reporting-dead-simple-reports-now-supports-excel-directly/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>upstream goes open source: dead simple reports</title>
		<link>http://upstre.am/2008/03/03/upstream-goes-open-source-dead-simple-reports/</link>
		<comments>http://upstre.am/2008/03/03/upstream-goes-open-source-dead-simple-reports/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 15:48:32 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[open-source]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[reports]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[upstream]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/03/03/upstream-goes-open-source-dead-simple-reports/</guid>
		<description><![CDATA[Na endlich. Nach all den Jahren des nur-Geldverdienens und Open Source-Ausnutzens haben wir es geschafft, ein paar erste Zeilen Code in die Freiheit zu entlassen: dead simple reports, ein Rails-Plugin, das Reports generieren kann. Mehr dazu im neuen Bereich Open Source]]></description>
			<content:encoded><![CDATA[<p>Na endlich. Nach all den Jahren des nur-Geldverdienens und Open Source-Ausnutzens haben wir es geschafft, ein paar erste Zeilen Code in die Freiheit zu entlassen: <a href="http://public_svn.upstream-berlin.com/dead_simple_reports/">dead simple reports</a>, ein Rails-Plugin, das Reports generieren kann. Mehr dazu im neuen Bereich <a href="http://upstream-berlin.com/blog/open-source/">Open Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://upstre.am/2008/03/03/upstream-goes-open-source-dead-simple-reports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySql Lost Connection Error in großen Rails Anwendungen</title>
		<link>http://upstre.am/2007/07/18/mysql-lost-connection-error-in-grosen-rails-anwendungen/</link>
		<comments>http://upstre.am/2007/07/18/mysql-lost-connection-error-in-grosen-rails-anwendungen/#comments</comments>
		<pubDate>Tue, 17 Jul 2007 23:03:37 +0000</pubDate>
		<dc:creator>Thilo Utke</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[lost-connection]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql_retry_lost_connection]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2007/07/18/mysql-lost-connection-error-in-grosen-rails-anwendungen/</guid>
		<description><![CDATA[Seit kurzen beunruhigt uns die folgende Fehlermeldung: Mysql::Error: Lost connection to MySQL server during query. Sie tritt immer wieder sporadisch ohne erkennbare Ursache auf. Heute Nacht bin ich eher durch Zufall auf eine Erklärung und idealerweise auch auf eine Lösung des Problems gestoßen. Kurz zusammengefasst: ActiveRecord verwendet pro Model eine Datenbankverbindung. Wenn die Datenbank unter [...]]]></description>
			<content:encoded><![CDATA[<p>Seit kurzen beunruhigt uns die folgende Fehlermeldung: <code>Mysql::Error: Lost connection to MySQL server during query</code>. Sie tritt immer wieder sporadisch ohne erkennbare Ursache auf. Heute Nacht bin ich eher durch Zufall auf eine Erklärung und idealerweise auch auf eine Lösung des Problems gestoßen.</p>
<p>Kurz zusammengefasst: ActiveRecord verwendet pro Model eine Datenbankverbindung. Wenn die Datenbank unter Last steht, kann es passieren, dass die Verbindung nicht schnell genug bereitgestellt wird und der <code>Lost-Connection</code>-Fehler auftritt.</p>
<p>Über das setzen von <code>ActiveRecord::Base.verification_timeout=14400</code> oder einen Wert niedriger als die MySql Server <code><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html">interactive_timeout</a></code> -Einstellung in der <code>environment.rb</code> lässt sich der Timeout heraufsetzen. Um dem Problem nachhaltig zu begegnen, hat <a href="http://blog.zvents.com">Tyler Kovacs</a> von <a href="http://www.zvents.com/">zvents</a> das Plugin<a href="http://rubyforge.org/projects/zventstools/">mysql_retry_lost_connection</a> geschrieben, das versucht, die Verbindung erneut herzustellen, wenn es einen Timeout gab.</p>
]]></content:encoded>
			<wfw:commentRss>http://upstre.am/2007/07/18/mysql-lost-connection-error-in-grosen-rails-anwendungen/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rails Fragment Caching &#8211; Testing and time based expiry</title>
		<link>http://upstre.am/2007/03/23/rails-fragment-caching-testing-and-time-based-expiry/</link>
		<comments>http://upstre.am/2007/03/23/rails-fragment-caching-testing-and-time-based-expiry/#comments</comments>
		<pubDate>Fri, 23 Mar 2007 19:14:18 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[expire-cache]]></category>
		<category><![CDATA[fragment-cache]]></category>
		<category><![CDATA[fragment-cache-test]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[time-fragment-cache]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2007/03/23/rails-fragment-caching-testing-and-time-based-expiry/</guid>
		<description><![CDATA[in the last days i started implementing caching for autoki.com. my first stop was this excellent rails caching tutorial over at railsenvy.com. basically, rails offers 3 ways of caching page content: page caching: an entire page gets stored on the hard disk and can then be served by apache instead of rails &#8211; very fast [...]]]></description>
			<content:encoded><![CDATA[<p>in the last days i started implementing caching for <a href="http://autoki.com">autoki.com</a>. my first stop was this excellent rails caching tutorial over at <a href="http://railsenvy.com">railsenvy.com</a>.</p>
<p>basically, rails offers 3 ways of caching page content:</p>
<ul>
<li>page caching: an entire page gets stored on the hard disk and can then be served by apache instead of rails &#8211; very fast but almost useless for us, as every page has some dynamic element in this. we still consider it for some ajax calls.</li>
<li>action caching: also caches the entire page, but it&#8217;s still served by rails, which means before_filters for stuff like authnetication still work &#8211; still not for us, see above</li>
<li>fragment caching: as the name implies caches fragments of a page &#8211; yay, sounds good</li>
</ul>
<h2>fragment caching</h2>
<p>the basics are really easy. first, you simply surround the parts of the page that you want to cache with a <code>&lt;% cache '<name'> ... &lt;% end %&gt;</name'></code>. this writes the fragment to a file in /tmp/caches and from now on, rails serves this part of the page from the cache.</p>
<p>this alone doesn&#8217;t get you any performance improvements yet, because your controller is still loading all the data from the database before rendering the view. to avoid this, you wrap your data loading code into <code>unless read_fragment 'name' ... end</code> blocks &#8211; now you page should be running lightning fast already.</p>
<p>the third problem to tackle is to clean the cache at the right time. this can either be done in the controllers by calling <code>expire_fragment 'name'</code> or by using so called <em>sweeper</em>s. they are basically observe your models and clean the right fragments on events like <code>after_create</code> &#8211; so when you add a new user to the system, you can clean the list of users from the cache.<br />
<span id="more-53"></span></p>
<h2>time based expiry</h2>
<p>sometimes, it&#8217;s not very efficient to clean the cache every time the underlying data changes. we have some site wide statistics for example, that require a load of processing power to calculate, and it&#8217;s enough if they get recalculated, say, every hour. rails doesn&#8217;t come with time bases cache expiry, but luckily, the <a href="http://livsey.org/2006/8/25/timed_fragment_cache-plugin-fragment-caching-with-time-based-expiry">timed_fragment_cache plugin</a> comes to the rescue. it allows you to add an expiry time to your <code>cache</code> blocks in the erb templates and adds another method <code>when_fragment_expired</code> to you controllers, which allows you to test if a fragment has expired before running your data loading code.</p>
<h2>testing it</h2>
<p>we have some fairly complex pages which results into a multitude of cache blocks and sweeper calls on many many models, so i wanted to make sure to get it all right &#8211; how else could i do this than by using <a href="http://en.wikipedia.org/wiki/Test-first_development">test first</a>? rails doesn&#8217;t offer any support for testing its caching functionality so i had to use another plugin: the <a href="http://blog.cosinux.org/pages/page-cache-test">page cache test plugin</a>. it basically offers two assertions: <code>assert_caches_fragments</code> makes sure that i have inserted a <code>cache</code> block in my template and that the fragment gets saved into the cache. <code>assert_expire_fragments</code> makes sure that my fragment gets removed from the cache when i hit a certain action. that&#8217;s all nice and good but a few things were missing: first, i wanted to test that my cache logic in the controller was working (i.e. i wasn&#8217;t loading data when i didn&#8217;t have to) and second, i wanted to test my time based expiring fragments as well.</p>
<h3>testing caching in the controllers</h3>
<p>my controller test does two things: first it hits the page and checks if the action has loaded a certain <code>@variable</code> &#8211; then it hits the same page again and checks that this time, the variable has not been loaded, i.e. the cache was hit instead. my custom assertion for that looks like this:</p>
<p>def assert_caches_fragments(*fragments, &amp;block)<br />
yield<br />
fragments.each do |fragment|<br />
assert_not_nil(assigns(fragment[1]), &#8220;Fragment &#8216;#{fragment[0]}&#8217;: the variable @#{fragment[1]} doesn&#8217;t get set at all&#8221;)<br />
end<br />
yield<br />
fragments.each do |fragment|<br />
assert_nil(assigns(fragment[1]), &#8220;Fragment &#8216;#{fragment[0]}&#8217; is not cached&#8221;)<br />
end<br />
end</p>
<p>now i can do this:</p>
<p>assert_caches_fragments ['/home/index/best_rated_auto', :best_rated_auto],<br />
['/home/index/best_game_auto', :best_game_auto] do<br />
get &#8216;/&#8217;<br />
end</p>
<p>this calls the url &#8216;/&#8217; and checks that the variable <code>@best_rated_auto</code> is filled with data. then it calls it again and makes sure rails now uses the &#8216;/home/index/best_rated_auto&#8217; fragment instead. same for the second pair.</p>
<h3>testing time based cache expiry</h3>
<p># time based fragment expiry cache test<br />
# asserts that the given fragments are enclosed in when_fragment_expired calls<br />
# fragments &#8211; 2 element arrays of [fragment_name, variable_name]<br />
# variable_name &#8211; the name of @variable that gets set when the cache has expired<br />
# &amp;block &#8211; the call that hits the action, e.g. get &#8216;/&#8217;<br />
def assert_expires_by_time(*fragments, &amp;block)<br />
yield<br />
fragments.each do |fragment|<br />
assert_not_nil(assigns(fragment[1]), &#8220;Fragment &#8216;#{fragment[0]}&#8217;: the variable @#{fragment[1]} doesn&#8217;t get set at all&#8221;)<br />
end<br />
yield<br />
fragments.each do |fragment|<br />
assert_nil(assigns(fragment[1]), &#8220;Fragment &#8216;#{fragment[0]}&#8217; is not cached at all&#8221;)<br />
set_fragment_date fragment[0], 1.minute.ago<br />
end<br />
yield<br />
fragments.each do |fragment|<br />
assert_not_nil assigns(fragment[1]), &#8220;Fragment &#8216;#{fragment[0]}&#8217; is not time cached&#8221;<br />
end<br />
end</p>
<p>def set_fragment_date(name, time)<br />
ActionController::Base.fragment_cache_store.write(name+&#8217;_meta&#8217;, YAML.dump(time))<br />
end</p>
<p>this code adds a bit more logic to the assertion in the last paragraph. after the second hit to the url it sets the fragment&#8217;s time so it is expired and hits the page a third time to check if the data comes from the database again.</p>
<h2>plugin hacking</h2>
<p>one last thing. in order not to fill my functional tests even more i decided to use integration tests for the cache testing. the fragment cache plugin has one limitation: in integration tests, it expects the fragment name to be a has, and that hash to contain a <code>:controller =&gt; 'my_controller'</code> pair. to work around this, i hacked the plugin the following way: in <em>fragment_cache_test.rb</em> i changed the first line of the <code>check_options_has_controller</code> method to this: <code>if option = options.detect { |option| option[:controller].nil? } &amp;&amp; !@controller</code> &#8211; now i could keep my fragment names and still use integration tests. all i had to do was to define <code>@controller = MyController.new</code> in my test.</p>
<p>welcome to fully tested rails caching <img src='http://upstre.am/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  now comes all the boring stuff &#8211; implementing it everywhere.</p>
]]></content:encoded>
			<wfw:commentRss>http://upstre.am/2007/03/23/rails-fragment-caching-testing-and-time-based-expiry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 6/18 queries in 0.004 seconds using disk

Served from: upstre.am @ 2010-09-07 16:37:46 -->