<?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>余心烦错 &#187; Rails</title>
	<atom:link href="http://blog.efrees.com/category/rails/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.efrees.com</link>
	<description>We shall meet in the place where there is no darkness.</description>
	<lastBuildDate>Mon, 09 Aug 2010 07:57:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>使用旧版i18n gem</title>
		<link>http://blog.efrees.com/%e4%bd%bf%e7%94%a8%e6%97%a7%e7%89%88i18n-gem.html</link>
		<comments>http://blog.efrees.com/%e4%bd%bf%e7%94%a8%e6%97%a7%e7%89%88i18n-gem.html#comments</comments>
		<pubDate>Sun, 27 Jun 2010 09:18:56 +0000</pubDate>
		<dc:creator>muzik</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.efrees.com/?p=189</guid>
		<description><![CDATA[rails升级到2.3.8之后，一个之前使用rails 2.3.5的app出问题了。 该app使用了active_scaffold插件，当页面需要显示datetime类型的数据时，就会出错，错误提示： Showing vendor/plugins/active_scaffold/frontends/default/ views/_list_record_columns.html.erb where line #3 raised: missing interpolation argument in "%Y-%m-%{count}" ({:object=&#62;Thu, 19 Jul 2007} given) 查看了一下server log，此app默认用了i18n新版0.4.1，此前使用的是0.3.7。 使用bundle用回0.3.7，该问题没再出现。 配置bundle的方法见官方说明：Using Bundler with Rails 2.3。在Gemfile里加入一行 gem "i18n", '0.3.7' 再运行命令 bundle install 重启服务器即可。]]></description>
			<content:encoded><![CDATA[<p></p><p>rails升级到2.3.8之后，一个之前使用rails 2.3.5的app出问题了。</p>
<p>该app使用了active_scaffold插件，当页面需要显示datetime类型的数据时，就会出错，错误提示：</p>
<blockquote><p>Showing<br />
<em>vendor/plugins/active_scaffold/frontends/default/<br />
views/_list_record_columns.html.erb</em><br />
where line <strong>#3</strong> raised:<br />
<code>missing interpolation argument in "%Y-%m-%{count}" ({:object=&gt;Thu, 19 Jul 2007} given)</code>
</p></blockquote>
<p>查看了一下server log，此app默认用了i18n新版0.4.1，此前使用的是0.3.7。</p>
<p>使用bundle用回0.3.7，该问题没再出现。</p>
<p>配置bundle的方法见官方说明：<a href="http://gembundler.com/rails23.html">Using Bundler with Rails 2.3</a>。在Gemfile里加入一行<br />
<code>gem "i18n", '0.3.7'</code><br />
再运行命令<br />
<code>bundle install</code><br />
重启服务器即可。</p>
<img src="http://blog.efrees.com/?ak_action=api_record_view&id=189&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.efrees.com/%e4%bd%bf%e7%94%a8%e6%97%a7%e7%89%88i18n-gem.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rails中创建RSS</title>
		<link>http://blog.efrees.com/creating-a-rss-feed-in-ruby-on-rails.html</link>
		<comments>http://blog.efrees.com/creating-a-rss-feed-in-ruby-on-rails.html#comments</comments>
		<pubDate>Thu, 22 Apr 2010 04:25:49 +0000</pubDate>
		<dc:creator>muzik</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.efrees.com/?p=176</guid>
		<description><![CDATA[PostsController &#160; def index &#160; &#160; @posts = Item.all&#40;:limit=&#62;10&#41; &#160; &#160; respond_to do &#124;format&#124; &#160; &#160; &#160; format.html &#160; &#160; &#160; format.xml&#160; &#123; render :template=&#62;'posts/rss.rxml'&#125; &#160; &#160; end &#160; end &#160; 使用respond_to可以根据需要返回不同的文档类型，如 访问http://localhost/posts,返回html 访问http://localhost/posts.xml,返回xml 是以，不是一定需要为feed新建一个action，直接用返回的xml作为RSS即可。上述代码中，访问/posts时，使用默认的posts/index.html.erb模板，访问posts.xml时，使用posts/rss.rxml模板。 app/views/posts/rss.rxml xml.instruct! xml.rss &#34;version&#34; =&#62; &#34;2.0&#34;, &#34;xmlns:dc&#34; =&#62; &#34;http://purl.org/dc/elements/1.1/&#34; do &#160;xml.channel do &#160; &#160;xml.title&#160; &#160; &#160; &#160;&#34;feed title&#34; &#160; &#160;xml.link&#160; [...]

<h3>Related posts:</h3><ol><li><a href='http://blog.efrees.com/farewell-google.html' rel='bookmark' title='Permanent Link: 别了，谷歌'>别了，谷歌</a> <small>壮士断腕，义无再辱 from 阮一峰的网络日志 三言二拍：Google退出中国 from 对牛乱弹琴 | Playin&#8217; with IT...</small></li>
<li><a href='http://blog.efrees.com/cakephp-tutorial-no-1-categories-acts-as-tree.html' rel='bookmark' title='Permanent Link: CakePHP 实例教程: Categories Acts as Tree'>CakePHP 实例教程: Categories Acts as Tree</a> <small>Tree是CakePHP 1.2的核心Behaviors之一，可以用来轻易的实现无限极分类，并呈现树状列表。 图片来源:Tree traversa,WIKIPEDIA 基础实例 建立数据表 CREATE TABLE `categories` &#40;...</small></li>
<li><a href='http://blog.efrees.com/linode-cpu-overload.html' rel='bookmark' title='Permanent Link: Deep link engine引致CPU占用过高'>Deep link engine引致CPU占用过高</a> <small>早上起来收到连串邮件，警告CPU占用过高。 登录上服务器一看，mysql的CPU占比竟然随时都在200%以上。 虽然心里也疑惑，CPU整体占用不过100%，何以mysql的数据会这么高？ 但也没细想，其中一个站数据量大，以前在godaday就曾引起过数据库超标， 当时的直接肇因是插件yet another related posts plugin。 于是先把服务器上几个站可能引起超标的插件都暂时禁用，...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><span id="PostsController"><h2>PostsController</h2></span>
<div class="code ruby" style="font-family: Georgia,serif;"><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> index<br />
&nbsp; &nbsp; @posts = Item.<span style="color:#9900CC;">all</span><span style="color:#006600; font-weight:bold;">&#40;</span>:limit=&gt;<span style="color:#006666;">10</span><span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; respond_to <span style="color:#9966CC; font-weight:bold;">do</span> |format|<br />
&nbsp; &nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">format</span>.<span style="color:#9900CC;">html</span><br />
&nbsp; &nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">format</span>.<span style="color:#9900CC;">xml</span>&nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span> render :template=&gt;'posts/rss.<span style="color:#9900CC;">rxml</span>'<span style="color:#006600; font-weight:bold;">&#125;</span><br />
&nbsp; &nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<br />
&nbsp;</div><br />
使用respond_to可以根据需要返回不同的文档类型，如</p>
<ol>
<li>访问http://localhost/posts,返回html</li>
<li>访问http://localhost/posts.xml,返回xml</li>
</ol>
<p>是以，不是一定需要为feed新建一个action，直接用返回的xml作为RSS即可。上述代码中，访问/posts时，使用默认的posts/index.html.erb模板，访问posts.xml时，使用posts/rss.rxml模板。</p>
<span id="appviewspostsrss.rxml"><h2>app/views/posts/rss.rxml</h2></span>
<div class="code ruby" style="font-family: Georgia,serif;"><br />
xml.<span style="color:#9900CC;">instruct</span>!<br />
<br />
xml.<span style="color:#9900CC;">rss</span> <span style="color:#996600;">&quot;version&quot;</span> =&gt; <span style="color:#996600;">&quot;2.0&quot;</span>, <span style="color:#996600;">&quot;xmlns:dc&quot;</span> =&gt; <span style="color:#996600;">&quot;http://purl.org/dc/elements/1.1/&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span><br />
&nbsp;xml.<span style="color:#9900CC;">channel</span> <span style="color:#9966CC; font-weight:bold;">do</span><br />
&nbsp; &nbsp;xml.<span style="color:#9900CC;">title</span>&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#996600;">&quot;feed title&quot;</span><br />
&nbsp; &nbsp;xml.<span style="color:#9900CC;">link</span>&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#996600;">&quot;url&quot;</span><br />
&nbsp; &nbsp;xml.<span style="color:#9900CC;">description</span> <span style="color:#996600;">&quot;description&quot;</span><br />
&nbsp; &nbsp;@posts.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> |post|<br />
&nbsp; &nbsp; &nbsp;xml.<span style="color:#9900CC;">item</span> <span style="color:#9966CC; font-weight:bold;">do</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;xml.<span style="color:#9900CC;">title</span>&nbsp; &nbsp; &nbsp; &nbsp;post.<span style="color:#9900CC;">title</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;xml.<span style="color:#9900CC;">link</span>&nbsp; &nbsp; &nbsp; &nbsp; post_url<span style="color:#006600; font-weight:bold;">&#40;</span>post<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;xml.<span style="color:#9900CC;">description</span> post.<span style="color:#9900CC;">content</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;xml.<span style="color:#9900CC;">guid</span>&nbsp; &nbsp; &nbsp; &nbsp; post_url<span style="color:#006600; font-weight:bold;">&#40;</span>post<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#008000; font-style:italic;">#optional</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;xml.<span style="color:#9900CC;">category</span>&nbsp; &nbsp; post.<span style="color:#9900CC;">category</span>.<span style="color:#9900CC;">name</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;xml.<span style="color:#9900CC;">author</span>&nbsp; &nbsp; &nbsp; post.<span style="color:#9900CC;">author</span>.<span style="color:#9900CC;">name</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;xml.<span style="color:#9900CC;">pubdate</span>&nbsp; &nbsp; &nbsp;post.<span style="color:#9900CC;">updated_at</span><br />
&nbsp; &nbsp; &nbsp; &nbsp;xml.<span style="color:#9900CC;">comments</span>&nbsp; &nbsp; post_url<span style="color:#006600; font-weight:bold;">&#40;</span>post<span style="color:#006600; font-weight:bold;">&#41;</span>+'<span style="color:#008000; font-style:italic;">#comments'</span><br />
&nbsp; &nbsp; &nbsp;<span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp; &nbsp;<span style="color:#9966CC; font-weight:bold;">end</span><br />
&nbsp;<span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span><br />
<br />
&nbsp;</div>
<span id="configroutes.rb"><h2>config/routes.rb</h2></span>
<p>现下访问/posts.xml即可得到rss文档。需要的话，可以重写/feed到这个地址以符合惯例。<br />
<div class="code ruby" style="font-family: Georgia,serif;">map.<span style="color:#9900CC;">feed</span> 'feed',:controller =&gt; <span style="color:#996600;">&quot;posts&quot;</span>,:<span style="color:#CC0066; font-weight:bold;">format</span>=&gt;'xml'<br />
&nbsp;</div><br />
如此feed_url就等同于http://localhost/feed，其实际等同于/posts.xml 。</p>
<span id="appviewslayoutsapplication.html.erb"><h2>app/views/layouts/application.html.erb</h2></span>
<p>在head里添加feed link，以便浏览器识别<br />
<div class="code ruby" style="font-family: Georgia,serif;">auto_discovery_link_tag :rss, feed_url, :title =&gt; <span style="color:#996600;">&quot;Feed name&quot;</span><br />
&nbsp;</div><br />
即可.</p>
<span id=""><h2>参考链接</h2></span>
<ul>
<li><a href="http://paulsturgess.co.uk/articles/show/13-creating-an-rss-feed-in-ruby-on-rails">Creating an RSS feed in Ruby on Rails</a></li>
</ul>
<img src="http://blog.efrees.com/?ak_action=api_record_view&id=176&type=feed" alt="" />

<h3>Related posts:</h3><ol><li><a href='http://blog.efrees.com/farewell-google.html' rel='bookmark' title='Permanent Link: 别了，谷歌'>别了，谷歌</a> <small>壮士断腕，义无再辱 from 阮一峰的网络日志 三言二拍：Google退出中国 from 对牛乱弹琴 | Playin&#8217; with IT...</small></li>
<li><a href='http://blog.efrees.com/cakephp-tutorial-no-1-categories-acts-as-tree.html' rel='bookmark' title='Permanent Link: CakePHP 实例教程: Categories Acts as Tree'>CakePHP 实例教程: Categories Acts as Tree</a> <small>Tree是CakePHP 1.2的核心Behaviors之一，可以用来轻易的实现无限极分类，并呈现树状列表。 图片来源:Tree traversa,WIKIPEDIA 基础实例 建立数据表 CREATE TABLE `categories` &#40;...</small></li>
<li><a href='http://blog.efrees.com/linode-cpu-overload.html' rel='bookmark' title='Permanent Link: Deep link engine引致CPU占用过高'>Deep link engine引致CPU占用过高</a> <small>早上起来收到连串邮件，警告CPU占用过高。 登录上服务器一看，mysql的CPU占比竟然随时都在200%以上。 虽然心里也疑惑，CPU整体占用不过100%，何以mysql的数据会这么高？ 但也没细想，其中一个站数据量大，以前在godaday就曾引起过数据库超标， 当时的直接肇因是插件yet another related posts plugin。 于是先把服务器上几个站可能引起超标的插件都暂时禁用，...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blog.efrees.com/creating-a-rss-feed-in-ruby-on-rails.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install — Phusion Passenger</title>
		<link>http://blog.efrees.com/install-phusion-passenger.html</link>
		<comments>http://blog.efrees.com/install-phusion-passenger.html#comments</comments>
		<pubDate>Fri, 06 Nov 2009 03:36:41 +0000</pubDate>
		<dc:creator>muzik</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.efrees.com/?p=127</guid>
		<description><![CDATA[Install — Phusion Passenger™ a.k.a. mod_rails / mod_rack. Phusion Passenger,亦即mod_rails,可用于Apache或nginx的快速部署模块。 安装 gem install passenger passenger-install-apache2-module 虚拟主机配置 &#60;Virtualhost *:80&#62; ServerName hostname DocumentRoot /home/muzik/workspace/appname/public/ RailsEnv development #默认为production &#60;Directory /home/muzik/workspace/appname/public/&#62; Options ExecCGI FollowSymLinks AllowOverride all Order allow,deny Allow from all &#60;/Directory&#62; ErrorLog /home/muzik/workspace/appname/log/error.log CustomLog /home/muzik/workspace/appname/log/access.log combined &#60;/Virtualhost&#62; 出现的问题 Missing the Rails 2.3.4 gem. 完整的错误提示: Missing the Rails 2.3.4 [...]

<h3>Related posts:</h3><ol><li><a href='http://blog.efrees.com/%e4%bd%bf%e7%94%a8%e6%97%a7%e7%89%88i18n-gem.html' rel='bookmark' title='Permanent Link: 使用旧版i18n gem'>使用旧版i18n gem</a> <small>rails升级到2.3.8之后，一个之前使用rails 2.3.5的app出问题了。 该app使用了active_scaffold插件，当页面需要显示datetime类型的数据时，就会出错，错误提示： Showing vendor/plugins/active_scaffold/frontends/default/ views/_list_record_columns.html.erb where line #3 raised:...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><ul>
<li><a href="http://www.modrails.com/install.html">Install — Phusion Passenger™ a.k.a. mod_rails / mod_rack</a>.</li>
</ul>
<p>Phusion Passenger,亦即mod_rails,可用于Apache或nginx的快速部署模块。</p>
<span id=""><h3>安装</h3></span>
<p><code><br />
gem install passenger<br />
passenger-install-apache2-module<br />
</code></p>
<span id="_1"><h3>虚拟主机配置</h3></span>
<p><code><br />
&lt;Virtualhost *:80&gt;<br />
ServerName hostname<br />
DocumentRoot /home/muzik/workspace/appname/public/<br />
RailsEnv development #默认为production<br />
&lt;Directory /home/muzik/workspace/appname/public/&gt;<br />
Options ExecCGI FollowSymLinks<br />
AllowOverride all<br />
Order allow,deny<br />
Allow from all<br />
&lt;/Directory&gt;<br />
ErrorLog /home/muzik/workspace/appname/log/error.log<br />
CustomLog /home/muzik/workspace/appname/log/access.log combined<br />
&lt;/Virtualhost&gt;<br />
</code></p>
<span id="_2"><h3>出现的问题</h3></span>
<span id="Missing_the_Rails_2.3.4_gem."><h4>Missing the Rails 2.3.4 gem.</h4></span>
<p>完整的错误提示:</p>
<blockquote><p>Missing the Rails 2.3.4 gem. Please `gem install -v=2.3.4 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. </p></blockquote>
<p>事实上，需要的gem都是安装过的，只是它找不到罢了。在config/environment.rb里添加上就好了:</p>
<div class="code ruby" style="font-family: Georgia,serif;"><br />
ENV<span style="color:#006600; font-weight:bold;">&#91;</span>'GEM_PATH'<span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">&quot;/home/muzik/.gem/ruby/1.8:#{ENV['GEM_PATH']}&quot;</span><br />
<br />
&nbsp;</div>
<img src="http://blog.efrees.com/?ak_action=api_record_view&id=127&type=feed" alt="" />

<h3>Related posts:</h3><ol><li><a href='http://blog.efrees.com/%e4%bd%bf%e7%94%a8%e6%97%a7%e7%89%88i18n-gem.html' rel='bookmark' title='Permanent Link: 使用旧版i18n gem'>使用旧版i18n gem</a> <small>rails升级到2.3.8之后，一个之前使用rails 2.3.5的app出问题了。 该app使用了active_scaffold插件，当页面需要显示datetime类型的数据时，就会出错，错误提示： Showing vendor/plugins/active_scaffold/frontends/default/ views/_list_record_columns.html.erb where line #3 raised:...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blog.efrees.com/install-phusion-passenger.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rails常用插件</title>
		<link>http://blog.efrees.com/frequently-used-rails-plugins.html</link>
		<comments>http://blog.efrees.com/frequently-used-rails-plugins.html#comments</comments>
		<pubDate>Sun, 01 Nov 2009 01:43:35 +0000</pubDate>
		<dc:creator>muzik</dc:creator>
				<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://blog.efrees.com/?p=125</guid>
		<description><![CDATA[AuthLogic Plugin Authlogic Authlogic Example App script/plugin install git://github.com/binarylogic/authlogic.git 简洁易用的分页插件Will Paginate will_paginate rdoc gem sources -a http://gemcutter.org gem install will_paginate #or script/plugin install git://github.com/mislav/will_paginate.git 用法 require &#34;will_paginate&#34; @posts = Post.paginate :page =&#38;gt;params&#91;:page&#93;, :order =&#38;gt; 'created_at DESC' &#38;lt;%= will_paginate @posts %&#38;gt; &#160; blueprint-css blueprint-css Related posts:rails中创建RSS PostsController &#160; def index &#160; &#160; @posts = Item.all&#40;:limit=&#62;10&#41; &#160;...

<h3>Related posts:</h3><ol><li><a href='http://blog.efrees.com/creating-a-rss-feed-in-ruby-on-rails.html' rel='bookmark' title='Permanent Link: rails中创建RSS'>rails中创建RSS</a> <small>PostsController &nbsp; def index &nbsp; &nbsp; @posts = Item.all&#40;:limit=&gt;10&#41; &nbsp;...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><div class='toc wptoc'>
<h2>Contents</h2>
<ol class='toc-odd level-1'>
	<li>
		<a href="#AuthLogic_Plugin">AuthLogic Plugin</a>
	</li>
	<li>
		<a href="#Will_Paginate">简洁易用的分页插件Will Paginate</a>
		<ol class='toc-even level-2'>
			<li>
				<a href="#">用法</a>
			</li>
		</ol>
	<li>
		<a href="#blueprint-css">blueprint-css</a>
	</li>
</ol>
</ol>
</ol>
</div>
<div class='wptoc-end'>&nbsp;</div>
<span id="AuthLogic_Plugin"><h3>AuthLogic Plugin</h3></span>
<ol>
<li><a href="http://github.com/binarylogic/authlogic">Authlogic</a></li>
<li><a href="http://github.com/binarylogic/authlogic_example">Authlogic Example App</a></li>
</ol>
<p><code><br />
script/plugin install git://github.com/binarylogic/authlogic.git<br />
</code></p>
<span id="Will_Paginate"><h3>简洁易用的分页插件Will Paginate</h3></span>
<ol>
<li><a href="http://wiki.github.com/mislav/will_paginate">will_paginate</a></li>
<li><a href="http://gitrdoc.com/mislav/will_paginate/tree/master/">rdoc</a></li>
</ol>
<p><code><br />
gem sources -a http://gemcutter.org<br />
gem install will_paginate<br />
#or<br />
script/plugin install git://github.com/mislav/will_paginate.git<br />
</code></p>
<span id=""><h4>用法</h4></span>
<div class="code ruby" style="font-family: Georgia,serif;"><br />
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">&quot;will_paginate&quot;</span><br />
@posts = Post.<span style="color:#9900CC;">paginate</span> :page =&amp;gt;params<span style="color:#006600; font-weight:bold;">&#91;</span>:page<span style="color:#006600; font-weight:bold;">&#93;</span>, :order =&amp;gt; 'created_at DESC'<br />
&amp;lt;%= will_paginate @posts %&amp;gt;<br />
<br />
&nbsp;</div>
<span id="blueprint-css"><h3>blueprint-css</h3></span>
<p><a href="http://github.com/joshuaclayton/blueprint-css">blueprint-css</a></p>
<img src="http://blog.efrees.com/?ak_action=api_record_view&id=125&type=feed" alt="" />

<h3>Related posts:</h3><ol><li><a href='http://blog.efrees.com/creating-a-rss-feed-in-ruby-on-rails.html' rel='bookmark' title='Permanent Link: rails中创建RSS'>rails中创建RSS</a> <small>PostsController &nbsp; def index &nbsp; &nbsp; @posts = Item.all&#40;:limit=&gt;10&#41; &nbsp;...</small></li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://blog.efrees.com/frequently-used-rails-plugins.html/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 (enhanced) (user agent is rejected)

Served from: blog.efrees.com @ 2010-09-06 12:41:44 -->