<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/xslt/rss2.xsl" media="screen"?>
<rss version="2.0"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Latest from ChinaonRails's Rails</title>
		<link>http://chinaonrails.com/go/rails</link>
		<description>ChinaonRails | ChinaonRails are one of the very few China based web consultancies, who specialize in application development using RubyOnRails/Agile/Ajax.</description>
		<category>Technology</category>
		<language>zh_cn</language>
		<item>
			<title>Factory girl ... 2 replies</title>
			<link>http://chinaonrails.com/topic/view/2023.html</link>
			<comments>http://chinaonrails.com/topic/view/2023.html#reply</comments>
			<dc:creator>rociiu</dc:creator>
			<author>rociiu</author>
			<!--<enclosure url="http://chinaonrails.com/img/p_1.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_s.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_n.gif" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			RT
			</description>
			<pubDate>Wed, 13 Aug 2008 11:28:41 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/2023.html</guid>
		</item>
		<item>
			<title>rubyflow 中文网站 ... 7 replies</title>
			<link>http://chinaonrails.com/topic/view/1981.html</link>
			<comments>http://chinaonrails.com/topic/view/1981.html#reply</comments>
			<dc:creator>cherry</dc:creator>
			<author>cherry</author>
			<!--<enclosure url="http://chinaonrails.com/img/p_2.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_2_s.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_2_n.gif" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			在&lt;a href="http://flow.rubynow.com" rel="nofollow external" class="tpc"&gt;flow.rubynow.com&lt;br /&gt;
&lt;/a&gt;可发布有关ruby on rails 的所有内容，不需要登陆就可发布你所知道的最新或者有用的资料。希望有识人士积极发言，相信你的付出可以让其他人和我们得到进步，非常感谢。
			</description>
			<pubDate>Tue, 05 Aug 2008 15:22:32 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1981.html</guid>
		</item>
		<item>
			<title>rubyflow 中文网站 ... 10 replies</title>
			<link>http://chinaonrails.com/topic/view/1979.html</link>
			<comments>http://chinaonrails.com/topic/view/1979.html#reply</comments>
			<dc:creator>cherry</dc:creator>
			<author>cherry</author>
			<!--<enclosure url="http://chinaonrails.com/img/p_2.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_2_s.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_2_n.gif" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			&amp;lt;a href="flow.rubynow.com"&amp;gt;flow.rubynow.com&amp;lt;/a&amp;gt;
			</description>
			<pubDate>Tue, 05 Aug 2008 14:07:29 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1979.html</guid>
		</item>
		<item>
			<title>rails 异常处理 ... no reply</title>
			<link>http://chinaonrails.com/topic/view/1977.html</link>
			<comments>http://chinaonrails.com/topic/view/1977.html#reply</comments>
			<dc:creator>老熊</dc:creator>
			<author>老熊</author>
			<!--<enclosure url="http://chinaonrails.com/img/p/530.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/530_s.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/530_n.jpg" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			原来异常处理都是比较简单的&lt;br /&gt;
begin&lt;br /&gt;
  ....&lt;br /&gt;
rescue Exception =&amp;gt; exc&lt;br /&gt;
  logger.error("#{exc.message}")&lt;br /&gt;
  redirect_to "/500.html"&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
但发现如果在 activerecode中的错误，那么可以处理得到，但如果是action_controller的错误，如DoubleRender、noaction等无法，则需要改成&lt;br /&gt;
begin&lt;br /&gt;
  raise&lt;br /&gt;
  ....&lt;br /&gt;
rescue Exception =&amp;gt; exc&lt;br /&gt;
  logger.error("#{exc.message}")&lt;br /&gt;
  redirect_to "/500.html"&lt;br /&gt;
end&lt;br /&gt;
才能处理到，不知道大家如何处理的，有什么好办法没有
			</description>
			<pubDate>Mon, 04 Aug 2008 17:59:47 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1977.html</guid>
		</item>
		<item>
			<title>请多多支持 ... 2 replies</title>
			<link>http://chinaonrails.com/topic/view/1964.html</link>
			<comments>http://chinaonrails.com/topic/view/1964.html#reply</comments>
			<dc:creator>cherry</dc:creator>
			<author>cherry</author>
			<!--<enclosure url="http://chinaonrails.com/img/p_2.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_2_s.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_2_n.gif" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			在www.flow.rubynow.com 可发布有关ruby on rails 的所有内容，不需要登陆就可发布你所知道的最新或者有用的资料。希望有识人士积极发言，相信你的付出可以让其他人和我们得到进步，非常感谢。
			</description>
			<pubDate>Thu, 31 Jul 2008 10:01:30 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1964.html</guid>
		</item>
		<item>
			<title>Clocking IT功能比Redmine还强大的项目管理软件 ... 3 replies</title>
			<link>http://chinaonrails.com/topic/view/1955.html</link>
			<comments>http://chinaonrails.com/topic/view/1955.html#reply</comments>
			<dc:creator>yjh</dc:creator>
			<author>yjh</author>
			<!--<enclosure url="http://chinaonrails.com/img/p_1.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_s.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_n.gif" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			之前在公司一直用Redmine作为项目管理工具，今天惊喜发现了Clocking IT，跟Redmine同样是一个项目管理工具，同样是用Rails做的，最重要是同样都是开源的！但Clocking IT要酷很多！有兴趣的可以去试用一下&lt;img src="/img/icons/silk/emoticon_smile.png" align="absmiddle" style="padding: 0px 2px 0px 2px;" border="0" /&gt;&lt;br /&gt;
http://www.clockingit.com/
			</description>
			<pubDate>Wed, 30 Jul 2008 10:13:30 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1955.html</guid>
		</item>
		<item>
			<title>Rails2.2英特纳兄奈尔一定要实现 ... 7 replies</title>
			<link>http://chinaonrails.com/topic/view/1918.html</link>
			<comments>http://chinaonrails.com/topic/view/1918.html#reply</comments>
			<dc:creator>bd7lx</dc:creator>
			<author>bd7lx</author>
			<!--<enclosure url="http://chinaonrails.com/img/p/9.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/9_s.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/9_n.jpg" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			&lt;a href="http://www.railsinside.com/news/52-rails-internationalization-in-2-2-i18n-module.html" rel="nofollow external" class="tpc"&gt;http://www.railsinside.com/news/52-rails-internationalization-in-2-2-i18n-module.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img class="code" src="http://www.railsinside.com/wp-content/uploads/2008/07/world.jpg" border="0" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://www.artweb-design.de/2008/7/18/the-ruby-on-rails-i18n-core-api" rel="nofollow external" class="tpc"&gt;http://www.artweb-design.de/2008/7/18/the-ruby-on-rails-i18n-core-api&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I18n最后的斗争
			</description>
			<pubDate>Tue, 22 Jul 2008 13:13:00 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1918.html</guid>
		</item>
		<item>
			<title>用ruby读RSS ... no reply</title>
			<link>http://chinaonrails.com/topic/view/1902.html</link>
			<comments>http://chinaonrails.com/topic/view/1902.html#reply</comments>
			<dc:creator>bd7lx</dc:creator>
			<author>bd7lx</author>
			<!--<enclosure url="http://chinaonrails.com/img/p/9.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/9_s.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/9_n.jpg" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			&lt;a href="http://rubybook.wordpress.com/2008/07/15/read-web-feeds-rss-atom/" rel="nofollow external" class="tpc"&gt;http://rubybook.wordpress.com/2008/07/15/read-web-feeds-rss-atom/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://chinaonrails.com/topic/view/1851.html" rel="nofollow external" class="tpc"&gt;莲花宝典里有专门一章的RSS话题&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="code"&gt;用ruby读RSS的库&lt;br /&gt;
&lt;br /&gt;
    * Simple RSS&lt;br /&gt;
    * FeedTools&lt;br /&gt;
    * rFeedParser&lt;br /&gt;
    * Feed Normalizer&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;img class="code" src="http://img297.imageshack.us/img297/4456/rss8519952pb0.jpg" border="0" /&gt;
			</description>
			<pubDate>Thu, 17 Jul 2008 15:06:48 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1902.html</guid>
		</item>
		<item>
			<title>Edge Rails 新特性之 Easy Memoization ... 1 reply</title>
			<link>http://chinaonrails.com/topic/view/1894.html</link>
			<comments>http://chinaonrails.com/topic/view/1894.html#reply</comments>
			<dc:creator>gemstone</dc:creator>
			<author>gemstone</author>
			<!--<enclosure url="http://chinaonrails.com/img/p/906.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/906_s.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/906_n.jpg" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			&lt;img class="code" src="http://osteele.com/images/2008/fizzbuzz-station.png" border="0" /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*要cache实例变量，以前做法：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
&lt;br /&gt;
class Person &amp;lt; ActiveRecord::Base&lt;br /&gt;
  def social_security&lt;br /&gt;
    @social_security ||= decrypt_social_security&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
*Edge Rails ：&lt;br /&gt;
&lt;div class="code"&gt;&lt;br /&gt;
&lt;br /&gt;
class Person &amp;lt; ActiveRecord::Base&lt;br /&gt;
&lt;br /&gt;
  # Memoize the result of the social_security method after&lt;br /&gt;
  # its first evaluation&lt;br /&gt;
  memorize :social_security&lt;br /&gt;
&lt;br /&gt;
  def social_security&lt;br /&gt;
    decrypt_social_security_for&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;/div&gt;
&lt;br /&gt;
原理：&lt;br /&gt;
这两种方式本质上是一样的，Edge只不过在幕后通过alias methods 做了类似于@social_security ||= decrypt_social_security的操作 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://feeds.feedburner.com/~r/RyansScraps/~3/336589927/what-s-new-in-edge-rails-memoization" rel="nofollow external" class="tpc"&gt;http://feeds.feedburner.com/~r/RyansScraps/~3/336589927/what-s-new-in-edge-rails-memoization&lt;/a&gt;
			</description>
			<pubDate>Wed, 16 Jul 2008 09:55:33 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1894.html</guid>
		</item>
		<item>
			<title>2点1虫子显微观 ... no reply</title>
			<link>http://chinaonrails.com/topic/view/1885.html</link>
			<comments>http://chinaonrails.com/topic/view/1885.html#reply</comments>
			<dc:creator>bd7lx</dc:creator>
			<author>bd7lx</author>
			<!--<enclosure url="http://chinaonrails.com/img/p/9.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/9_s.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/9_n.jpg" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			&lt;a href="http://antoniocangiano.com/2008/07/14/a-close-look-at-three-rails-21-bugs/" rel="nofollow external" class="tpc"&gt;http://antoniocangiano.com/2008/07/14/a-close-look-at-three-rails-21-bugs/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Rails2.1三个和数据库相关的bugs&lt;br /&gt;
&lt;img class="code" src="http://technabob.com/blog/wp-content/uploads/2007/06/hex_bug_robot.jpg" border="0" /&gt;&lt;br /&gt;
&lt;br /&gt;
http://chinaonrails.com/topic/view/32.html
			</description>
			<pubDate>Tue, 15 Jul 2008 09:16:07 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1885.html</guid>
		</item>
		<item>
			<title>别人4天搞个项目，我们不能吗 ... 9 replies</title>
			<link>http://chinaonrails.com/topic/view/1862.html</link>
			<comments>http://chinaonrails.com/topic/view/1862.html#reply</comments>
			<dc:creator>rukidding</dc:creator>
			<author>rukidding</author>
			<!--<enclosure url="http://chinaonrails.com/img/p_1.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_s.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_n.gif" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			bd7lx说说可以吗&lt;br /&gt;
&lt;br /&gt;
人才招募中....&lt;br /&gt;
合作模式探索中....&lt;br /&gt;
项目讨论中.....&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
大晚上的发帖，精神可嘉
			</description>
			<pubDate>Thu, 10 Jul 2008 23:48:37 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1862.html</guid>
		</item>
		<item>
			<title>如何应用我的RBAC到实际应用中去? ... 10 replies</title>
			<link>http://chinaonrails.com/topic/view/1852.html</link>
			<comments>http://chinaonrails.com/topic/view/1852.html#reply</comments>
			<dc:creator>蕲春人</dc:creator>
			<author>蕲春人</author>
			<!--<enclosure url="http://chinaonrails.com/img/p/842.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/842_s.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/842_n.jpg" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			大家一看就应该明白这几张表是什么关系了吧?一个用户可以拥有多个角色,一个角色也可以拥有多个用户,一个角色可以拥有多个操作权限,而一个操作权限也可以属于多个角色.&lt;br /&gt;
另外要说的一点就是:在表permissions中,name表示操作的名字,就是用来显示在页面上的,如"删除新闻",而action是就代表真正的操作.&lt;br /&gt;
&lt;br /&gt;
现在对于user,role,permission的操作我都实现了(包括对usser对role的勾选和role对permission的勾选)&lt;br /&gt;
而且在我的User模型中,我也写了方法,用以取得user所拥有的权限: &lt;div class="code"&gt;   1. class User &amp;lt; ActiveRecord::Base  &lt;br /&gt;
   2.     has_and_belongs_to_many :roles  &lt;br /&gt;
   3.       &lt;br /&gt;
   4.       &lt;br /&gt;
   5.     #User login validate  &lt;br /&gt;
   6.     def self.login_validate(name, password)  &lt;br /&gt;
   7.         user = User.find_by_name(name)  &lt;br /&gt;
   8.         if user  &lt;br /&gt;
   9.             if user.password == password  &lt;br /&gt;
  10.                 return user               &lt;br /&gt;
  11.             else  &lt;br /&gt;
  12.                 user = nil  &lt;br /&gt;
  13.             end  &lt;br /&gt;
  14.         end  &lt;br /&gt;
  15.         user  &lt;br /&gt;
  16.     end  &lt;br /&gt;
  17.       &lt;br /&gt;
  18.     #Get user's all permissions  &lt;br /&gt;
  19.     def permissions  &lt;br /&gt;
  20.         user_permissions = Array.new  &lt;br /&gt;
  21.         for role in self.roles  &lt;br /&gt;
  22.             user_permissions += role.permissions              &lt;br /&gt;
  23.         end  &lt;br /&gt;
  24.         user_permissions  &lt;br /&gt;
  25.     end  &lt;br /&gt;
  26.       &lt;br /&gt;
  27. end  &lt;/div&gt;
现在说说对于这个系统,我的思想.我的权限主要是用于后台管理方面的(/admin),因此在/app/controllers/admin下有 &lt;div class="code"&gt;# class Admin::AdminController &amp;lt; ActionController::Base  &lt;br /&gt;
#       &lt;br /&gt;
#     #Set layout for Admin board  &lt;br /&gt;
#     layout "admin"  &lt;br /&gt;
#       &lt;br /&gt;
#     before_filter :authorizate  &lt;br /&gt;
#       &lt;br /&gt;
#     def authorizate  &lt;br /&gt;
#         puts "authorizate"  &lt;br /&gt;
#         is_login?  &lt;br /&gt;
#         #这里现在写什么啊?大家给指点一下啊  &lt;br /&gt;
#     end  &lt;br /&gt;
#       &lt;br /&gt;
#     #Validate the user has loged in or not  &lt;br /&gt;
#     def is_login?  &lt;br /&gt;
#         unless session[:user]  &lt;br /&gt;
#             flash[:notice] = "Please login first!"  &lt;br /&gt;
#             redirect_to "/login"  &lt;br /&gt;
#         end  &lt;br /&gt;
#     end  &lt;br /&gt;
#   &lt;br /&gt;
# end &lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
对于admin模块下的其它controller,都是继承这个Admin Controller,我现在就是迷惑了,不知道如何验证权限.&lt;br /&gt;
&lt;br /&gt;
我以前用Java做权限管理系统(SSH),大体思想是这样的:所用的操作最终都是基于URL请求的,eg:http://localhost:8080/admin/postAction.do?method=list(postAction代表了一个模块,而list代表了一个操作)&lt;br /&gt;
我在用户登录是就把用户的权限操作列表保存到Session中,然后写一个作用于/admin的过滤器,用来检查当前登录用户的权限列表中的许可的url是否包含请求的url,这样就能实现权限的管理.&lt;br /&gt;
&lt;br /&gt;
然而现在在rails中,url不适用了,大家给指点一下,如何基于我目前所做的来应用这个权限验证.
			</description>
			<pubDate>Wed, 09 Jul 2008 09:47:03 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1852.html</guid>
		</item>
		<item>
			<title>重构代码 an ActiveRecord callback ... no reply</title>
			<link>http://chinaonrails.com/topic/view/1840.html</link>
			<comments>http://chinaonrails.com/topic/view/1840.html#reply</comments>
			<dc:creator>bd7lx</dc:creator>
			<author>bd7lx</author>
			<!--<enclosure url="http://chinaonrails.com/img/p/9.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/9_s.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/9_n.jpg" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			Refactoring an ActiveRecord callback&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://technicalpickles.com/posts/refactoring-a-activerecord-callback" rel="nofollow external" class="tpc"&gt;http://technicalpickles.com/posts/refactoring-a-activerecord-callback&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
http://giantrobots.thoughtbot.com/2008/6/2/slides-from-railsconf&lt;br /&gt;
&lt;br /&gt;
&lt;img class="code" src="http://giantrobots.thoughtbot.com/assets/2008/6/2/firstslide.png" border="0" /&gt;
			</description>
			<pubDate>Mon, 07 Jul 2008 11:52:25 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1840.html</guid>
		</item>
		<item>
			<title>半年总结-业界10件大事回顾 ... no reply</title>
			<link>http://chinaonrails.com/topic/view/1826.html</link>
			<comments>http://chinaonrails.com/topic/view/1826.html#reply</comments>
			<dc:creator>bd7lx</dc:creator>
			<author>bd7lx</author>
			<!--<enclosure url="http://chinaonrails.com/img/p/9.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/9_s.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/9_n.jpg" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			&lt;a href="http://rorblog.techcfl.com/2008/07/03/top-ten-ruby-and-rails-happenings-in-08/" rel="nofollow external" class="tpc"&gt;http://rorblog.techcfl.com/2008/07/03/top-ten-ruby-and-rails-happenings-in-08/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Joel Spolsky 在RailsConf 2008的关键发言，属于最没有技术性的。&lt;br /&gt;
&lt;a href="http://www.railsonwave.com/railsonwave/2008/5/30/joel-spolsky-s-keynote" rel="nofollow external" class="tpc"&gt;http://www.railsonwave.com/railsonwave/2008/5/30/joel-spolsky-s-keynote&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;img class="code" src="http://img74.imageshack.us/img74/6320/77816968od1.png" border="0" /&gt;
			</description>
			<pubDate>Fri, 04 Jul 2008 10:43:58 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1826.html</guid>
		</item>
		<item>
			<title>Github上如果打标签 ... no reply</title>
			<link>http://chinaonrails.com/topic/view/1817.html</link>
			<comments>http://chinaonrails.com/topic/view/1817.html#reply</comments>
			<dc:creator>ashchan</dc:creator>
			<author>ashchan</author>
			<!--<enclosure url="http://chinaonrails.com/img/p/783.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/783_s.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/783_n.jpg" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			几乎所有介绍tag的git教程上描述的都是如何打本地标签(local tag），昨天折腾了一阵，终于搞清楚如何对remote repository打标签了，分享一下：http://blog.ashchan.com/archive/2008/06/30/tags-on-git/
			</description>
			<pubDate>Tue, 01 Jul 2008 20:31:02 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1817.html</guid>
		</item>
		<item>
			<title>诚聘Rails开发工程师/高级工程师 ... 3 replies</title>
			<link>http://chinaonrails.com/topic/view/1783.html</link>
			<comments>http://chinaonrails.com/topic/view/1783.html#reply</comments>
			<dc:creator>hongtaolee</dc:creator>
			<author>hongtaolee</author>
			<!--<enclosure url="http://chinaonrails.com/img/p_1.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_s.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_n.gif" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			Yobo在中国移动互联网和媒体娱乐界是一个崭新的名字，我们是一家依托于硅谷理念的外资跨平台移动互联网媒体与娱乐公司。 &lt;br /&gt;
&lt;br /&gt;
Yobo的名字体现了我们的理念- 朋友，传播！友播公司致力于营造一个愉悦高效的工作环境，解除你的后顾之忧，充分发挥每个人的创造力，为一个共同的理念并肩奋斗，无论从技术上产品设计上还是经营理念上都敢为天下先！ &lt;br /&gt;
&lt;br /&gt;
我们寻找的你应该是： &lt;br /&gt;
&lt;br /&gt;
心理年龄20-28，性别不限，扎实严谨，用于接受挑战，永远对新鲜事物抱有不灭的好奇心，渴望在一个活泼又紧张的集体里贡献智慧和力量！ &lt;br /&gt;
&lt;br /&gt;
我们的成长平台： &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- 员工福利 &lt;br /&gt;
Yobo为每一位优秀的员工提供最具竞争力的薪资以及全面的She会福利保障。 &lt;br /&gt;
&lt;br /&gt;
- 员工发展计划 &lt;br /&gt;
公司以为员工提供理想的职业平台为己任，根据员工成长的需要提供包括新员工培训、岗位培训、素质培训在内的一系列员工发展计划，并提供公平竞争的内部发展规划。 &lt;br /&gt;
&lt;br /&gt;
公司给与每一位有激情、勇于创新的成员一个公平竞争、展示自我的大舞台。公司管理注重实效，风格活泼平等，这里鼓励个性张扬，同时看重团队合作，有的是互相鼓励帮助和关爱，而没有复杂的人际ZhengZhi！不论你是初出校园，还是业界大腕，总能在这个年轻的团队里找到高速成长的兴奋，和创造卓越的空间！ &lt;br /&gt;
&lt;br /&gt;
我们期待您的加入！！ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
工作地点：北京 &lt;br /&gt;
&lt;br /&gt;
联系方式：fanjie@yobo.com &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
为了确保可以尽快与应聘人员取得联系，请大家提供个人相关工作经历、姓名以及电话联系方式，谢谢！收到您的简历后，我们会根据职位的需求，在3-7个工作日内通知符合条件的人员面试。如果届时您没有接到我们的电话，我们也非常感谢您的关注，谢谢！
			</description>
			<pubDate>Tue, 24 Jun 2008 15:49:35 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1783.html</guid>
		</item>
		<item>
			<title>诚聘Ajax开发工程师/高级工程师 ... no reply</title>
			<link>http://chinaonrails.com/topic/view/1782.html</link>
			<comments>http://chinaonrails.com/topic/view/1782.html#reply</comments>
			<dc:creator>hongtaolee</dc:creator>
			<author>hongtaolee</author>
			<!--<enclosure url="http://chinaonrails.com/img/p_1.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_s.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_n.gif" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			Yobo在中国移动互联网和媒体娱乐界是一个崭新的名字，我们是一家依托于硅谷理念的外资跨平台移动互联网媒体与娱乐公司。 &lt;br /&gt;
Yobo的名字体现了我们的理念- 朋友，传播！友播公司致力于营造一个愉悦高效的工作环境，解除你的后顾之忧，充分发挥每个人的创造力，为一个共同的理念并肩奋斗，无论从技术上产品设计上还是经营理念上都敢为天下先！ &lt;br /&gt;
我们寻找的你应该是： &lt;br /&gt;
心理年龄20-28，性别不限，扎实严谨，用于接受挑战，永远对新鲜事物抱有不灭的好奇心，渴望在一个活泼又紧张的集体里贡献智慧和力量！ &lt;br /&gt;
我们的成长平台： &lt;br /&gt;
&lt;br /&gt;
- 员工福利 &lt;br /&gt;
Yobo为每一位优秀的员工提供最具竞争力的薪资以及全面的She会福利保障。 &lt;br /&gt;
- 员工发展计划 &lt;br /&gt;
公司以为员工提供理想的职业平台为己任，根据员工成长的需要提供包括新员工培训、岗位培训、素质培训在内的一系列员工发展计划，并提供公平竞争的内部发展规划。 &lt;br /&gt;
公司给与每一位有激情、勇于创新的成员一个公平竞争、展示自我的大舞台。公司管理注重实效，风格活泼平等，这里鼓励个性张扬，同时看重团队合作，有的是互相鼓励帮助和关爱，而没有复杂的人际ZhengZhi！不论你是初出校园，还是业界大腕，总能在这个年轻的团队里找到高速成长的兴奋，和创造卓越的空间！ &lt;br /&gt;
我们期待您的加入！！ &lt;br /&gt;
&lt;br /&gt;
工作地点：北京 &lt;br /&gt;
联系方式：fanjie@yobo.com &lt;br /&gt;
&lt;br /&gt;
为了确保可以尽快与应聘人员取得联系，请大家提供个人相关工作经历、姓名以及电话联系方式，谢谢！收到您的简历后，我们会根据职位的需求，在3-7个工作日内通知符合条件的人员面试。如果届时您没有接到我们的电话，我们也非常感谢您的关注，谢谢！
			</description>
			<pubDate>Tue, 24 Jun 2008 15:48:07 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1782.html</guid>
		</item>
		<item>
			<title>熟悉Ruby On Rails的看过来-好机会 ... no reply</title>
			<link>http://chinaonrails.com/topic/view/1780.html</link>
			<comments>http://chinaonrails.com/topic/view/1780.html#reply</comments>
			<dc:creator>shangby</dc:creator>
			<author>shangby</author>
			<!--<enclosure url="http://chinaonrails.com/img/p_2.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_2_s.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_2_n.gif" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			Requirements: &lt;br /&gt;
&lt;br /&gt;
Education&lt;br /&gt;
•	English - fluency - ability to talk on phone with colleagues in US&lt;br /&gt;
•	BS degree with major in Computer Science or related field&lt;br /&gt;
&lt;br /&gt;
Web 2.0 Technology &lt;br /&gt;
•	2+ years experience developing web-based applications.&lt;br /&gt;
•	Experience with Javascript, DHTML, CSS, AJAX, XML. &lt;br /&gt;
•	1+ years experience with Ruby on Rails.&lt;br /&gt;
&lt;br /&gt;
Other technical &lt;br /&gt;
•	Knowledgeable in MySQL and SQL query language. &lt;br /&gt;
•	REST architecture, Agile development, Subversion.&lt;br /&gt;
•	Linux, Apache, Mongrel.&lt;br /&gt;
&lt;br /&gt;
If you need more information, send enquires or your CV to delia@shangby.com. Thanks.
			</description>
			<pubDate>Tue, 24 Jun 2008 14:24:17 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1780.html</guid>
		</item>
		<item>
			<title>修改error_messages_for，讓表單錯誤資訊中文化更完整 ... 6 replies</title>
			<link>http://chinaonrails.com/topic/view/1773.html</link>
			<comments>http://chinaonrails.com/topic/view/1773.html#reply</comments>
			<dc:creator>CFC</dc:creator>
			<author>CFC</author>
			<!--<enclosure url="http://chinaonrails.com/img/p/110.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/110_s.jpg" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p/110_n.jpg" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			今天摸會了Git，就順便應用上了&lt;br /&gt;
error_messages_for大家都用過，也都知道這個不管再怎樣中文化，欄位名稱一樣都會出現給你看！&lt;br /&gt;
這真的是令人又愛(英語體系者愛)又恨(非英語體系者恨)的功能啊..&lt;br /&gt;
沒辦法，只好自己動手了...&lt;br /&gt;
我剛剛發了Git pull給Rails團隊，他們接受不接受我不知道，所以在這邊教大家如何自己搞定這一切&lt;br /&gt;
首先，先打開Rails這部份的原始碼&lt;br /&gt;
假設我Ruby安裝在C:\&lt;br /&gt;
所以路徑就是：C:\ruby\lib\ruby\gems\1.8\gems\actionpack-2.1.0\lib\action_view\helpers\active_record_helper.rb&lt;br /&gt;
接著，跳到error_messages_for那段程式碼，在options = params.extract_options!.symbolize_keys底下加入：fields = options[:fields] unless options[:fields].nil?&lt;br /&gt;
然後把error_messages = objects.sum {|object| object.errors.full_messages.map {|msg| content_tag(:li, msg) } }.join這行註解，改為：&lt;br /&gt;
&lt;br /&gt;
    error_messages = objects.sum {|object| object.errors.full_messages.map {|msg|&lt;br /&gt;
                  unless fields.nil?&lt;br /&gt;
                    msg = msg.split(" ")&lt;br /&gt;
                    msg = msg.reverse.push(fields[msg.shift.downcase!.to_sym]).reverse.join(" ")&lt;br /&gt;
                  end&lt;br /&gt;
                  content_tag(:li, msg)&lt;br /&gt;
    } }.join&lt;br /&gt;
&lt;br /&gt;
存檔離開，然後這樣用：&lt;br /&gt;
&lt;br /&gt;
    error_messages_for(&lt;img src="/img/icons/silk/emoticon_tongue.png" align="absmiddle" style="padding: 0px 2px 0px 2px;" border="0" /&gt;roject, :fields =&amp;gt; {:name =&amp;gt; "專案名稱", :summary =&amp;gt; "專案摘要"})&lt;br /&gt;
&lt;br /&gt;
而content_tag產生出來的就會是&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;li&amp;gt;專案名稱 can't be blank&amp;lt;/li&amp;gt;&amp;lt;!-- 或其他的錯誤訊息 //--&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;專案摘要 can't be blank&amp;lt;/li&amp;gt;&amp;lt;!-- 或其他的錯誤訊息 //--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
很簡單吧&lt;img src="/img/icons/silk/emoticon_tongue.png" align="absmiddle" style="padding: 0px 2px 0px 2px;" border="0" /&gt;?&lt;br /&gt;
注意，只能夠傳小寫的symbol進去&lt;br /&gt;
沒辦法，我功力太差了=_=|||&lt;br /&gt;
可以參考這邊：http://github.com/cfc/rails/commit/9e38903fd10a2de9ae9c2ca53623469f3575b43c&lt;br /&gt;
有任何問題歡迎提出，也可以在github上commit給我&lt;br /&gt;
多謝多謝&lt;img src="/img/icons/silk/emoticon_tongue.png" align="absmiddle" style="padding: 0px 2px 0px 2px;" border="0" /&gt;
			</description>
			<pubDate>Tue, 24 Jun 2008 01:07:52 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1773.html</guid>
		</item>
		<item>
			<title>我的ROR项目正式发布啦！ ... 4 replies</title>
			<link>http://chinaonrails.com/topic/view/1761.html</link>
			<comments>http://chinaonrails.com/topic/view/1761.html#reply</comments>
			<dc:creator>pure</dc:creator>
			<author>pure</author>
			<!--<enclosure url="http://chinaonrails.com/img/p_1.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_s.gif" type="image/jpeg" />
			<enclosure url="http://chinaonrails.com/img/p_1_n.gif" type="image/jpeg" />-->
			<category>Rails</category>
			<description>
			我的ROR项目正式发布啦！目前功能较少，还有更多功能在增加中，这个网站从rails1.2开始，每次rails新版本发布我都进行了升级，感觉到性能和易用性的很大改善，现在rails版本是2.1。后面我将写一下开发这个项目的相关经验，谢谢支持！ &lt;br /&gt;
&lt;br /&gt;
http://www.imeifa.com.cn
			</description>
			<pubDate>Sat, 21 Jun 2008 11:10:21 +0800</pubDate>
			<guid>http://chinaonrails.com/topic/view/1761.html</guid>
		</item>
	</channel>
</rss>