<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>young4u_amy</title>
    <link>https://ruby-china.org/young4u_amy</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>5 年 + PHP 攻城狮求 Ruby 项目实践</title>
      <description>&lt;p&gt;帮一好朋友发的帖子 因为他新注册的号无法发帖。&lt;/p&gt;

&lt;p&gt;此人 5 年 + 丰富的 PHP Web 开发经验，一直就职于美资公司，英语听说写流利。之前兼修过.Net, asp 神马的，用.Net 开发过 WinForm Application。目前对 Ruby 产生浓厚兴趣，有一定的业余时间，希望能加入一个 Ruby 或 Rails 项目实战，快速增长一下相关经验。&lt;/p&gt;

&lt;p&gt;期望能加入一个有 Ruby 高手可以指点，提携的团队/（开源）项目，不图别的，为以后向 Ruby 转型打基础。所以如果碰到志趣相投或有趣的团队/项目，愿意完全&lt;strong&gt;Free&lt;/strong&gt;加入。当然老板如果觉得对他工作满意的话，打赏点啤酒钱也是不亦乐乎的哈。&lt;/p&gt;

&lt;p&gt;没办法 就是好学 任性！求小伙伴们的关注和转播哈，有兴趣的可以联系 hjzdhr#gmail&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Thu, 20 Nov 2014 10:50:25 +0800</pubDate>
      <link>https://ruby-china.org/topics/22772</link>
      <guid>https://ruby-china.org/topics/22772</guid>
    </item>
    <item>
      <title>求助 mysql2 不能 catch exception</title>
      <description>&lt;p&gt;想写一个简单的 ruby 脚本往数据库插数据，但是想捕获异常的时候遇到困难。比如我故意使用错误的数据库密码连接，但 rescue 却不能捕获到异常。求问是我哪里做的不对么？&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]
&lt;/code&gt;&lt;/pre&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;begi&lt;/span&gt;&lt;span class="err"&gt;&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; 
   &lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Mysql2&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="ss"&gt;:host&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="no"&gt;MYSQL_HOST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:username&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="no"&gt;MYSQL_USER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="ss"&gt;:password&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="no"&gt;MYSQL_PASS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:database&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="no"&gt;MYSQL_DB&lt;/span&gt;
   &lt;span class="p"&gt;)&lt;/span&gt;
   &lt;span class="c1"&gt;# some update query below &lt;/span&gt;
&lt;span class="k"&gt;rescue&lt;/span&gt; &lt;span class="no"&gt;Exception&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;
   &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;message&lt;/span&gt;
   &lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;backtrace&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;inspect&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Thu, 25 Sep 2014 15:33:36 +0800</pubDate>
      <link>https://ruby-china.org/topics/21722</link>
      <guid>https://ruby-china.org/topics/21722</guid>
    </item>
    <item>
      <title>求问大神 小额支付有什么好的解决方案</title>
      <description>&lt;p&gt;想做个小范围的小额支付 (&amp;lt; 10 元) 相关的工具，但查询了一下支付宝和微信支付手续费都太高了。&lt;/p&gt;

&lt;p&gt;支付宝手续费最低好像是 5 毛，微信 保证金 2 万元，手续费为 0.6%。&lt;/p&gt;

&lt;p&gt;求问大神们，有没有其他可靠的替换方案那？最好有 API 支持&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Mon, 18 Aug 2014 17:07:36 +0800</pubDate>
      <link>https://ruby-china.org/topics/21088</link>
      <guid>https://ruby-china.org/topics/21088</guid>
    </item>
    <item>
      <title>[买买买] rmbp13 寸现在入手靠不靠谱？</title>
      <description>&lt;p&gt;想入手 13 寸中配，不知道下一版本什么时候推出，看 Macrumors 现在是警告标示，有点纠结。。。。
求各位大神拍醒！
&lt;img src="https://l.ruby-china.com/photo/2014/e198b55c301f93e927e36ebeab326013.png" title="" alt=""&gt;&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Tue, 03 Jun 2014 17:41:09 +0800</pubDate>
      <link>https://ruby-china.org/topics/19709</link>
      <guid>https://ruby-china.org/topics/19709</guid>
    </item>
    <item>
      <title>Inspiring Sublime Text icon， 今天你换了么?</title>
      <description>&lt;p&gt;在推上看到的推荐 个人觉得超级赞 换上之后腰不酸 眼不疼 programming 都更有劲了！&lt;/p&gt;

&lt;p&gt;废话不多说，上图&lt;/p&gt;

&lt;p&gt;&lt;img src="//l.ruby-china.com/photo/2014/509abcf9dd7b870e76c56b6a72f400c3.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;Dribbble 地址（内附下载）:
&lt;a href="http://dribbble.com/shots/1195715--Free-Sublime-Text-2-icon" rel="nofollow" target="_blank"&gt;http://dribbble.com/shots/1195715--Free-Sublime-Text-2-icon&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;我的 ST3 的替换路径是
&lt;code&gt;open /Applications/Sublime\ Text.app/Contents/Resources&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;不多说了，我要开始马上搞一个 whatsboob 出来！&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Thu, 20 Feb 2014 17:22:34 +0800</pubDate>
      <link>https://ruby-china.org/topics/17380</link>
      <guid>https://ruby-china.org/topics/17380</guid>
    </item>
    <item>
      <title>圣诞节快到了 大家轻松一下</title>
      <description>&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;ruby&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="s1"&gt;'C=`stty size`.scan(/\d+/)[1].to_i;S=["2743".to_i(16)].pack("U*");a={};puts "\033[2J";loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H"};$stdout.flush;sleep 0.1}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src="//l.ruby-china.com/photo/2013/2950cf88394cc29caa606ed2bf66fa94.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;happy holidays!&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Mon, 16 Dec 2013 11:12:09 +0800</pubDate>
      <link>https://ruby-china.org/topics/16219</link>
      <guid>https://ruby-china.org/topics/16219</guid>
    </item>
    <item>
      <title>测试 put 请求获取不到 session</title>
      <description>&lt;p&gt;遇到一个奇怪的事，在测试&lt;code&gt;put&lt;/code&gt;请求的时候死活得不到设置的 session 值，只有&lt;code&gt;get&lt;/code&gt;才会得到 session 值&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;put&lt;/span&gt; &lt;span class="ss"&gt;:update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;:id&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;111&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="ss"&gt;:user_id&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;123&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;assert_redirected_to&lt;/span&gt; &lt;span class="n"&gt;xxx_path&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:user_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;123&lt;/span&gt;
&lt;span class="n"&gt;put&lt;/span&gt; &lt;span class="ss"&gt;:update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:id&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;111&lt;/span&gt;
&lt;span class="n"&gt;assert_redirected_to&lt;/span&gt; &lt;span class="n"&gt;xxx_path&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我试着在&lt;code&gt;update&lt;/code&gt;的 action 里加一行代码测试 (render 之前)&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kp"&gt;false&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:user_id&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;present?&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;session&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:user_id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;123&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;然后如果我在测试里传的 session 不是 123 的时候，会出现报错，update 没有 template 那种，应该说明 session 值生效了。&lt;/p&gt;

&lt;p&gt;可同事那边试了却不好使，只有改成&lt;code&gt;get&lt;/code&gt;才能得到我这种效果。&lt;/p&gt;

&lt;p&gt;求各位大神帮忙分析分析，我百撕不得其姐&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Thu, 05 Sep 2013 14:55:59 +0800</pubDate>
      <link>https://ruby-china.org/topics/13900</link>
      <guid>https://ruby-china.org/topics/13900</guid>
    </item>
    <item>
      <title>Rails 3 项目加载 module 失败</title>
      <description>&lt;p&gt;在升级一个 rails 2 的项目到 3，原本这个 module 是放在 model 文件夹下的，然后在一个 model 里直接
&lt;code&gt;include CustomModule&lt;/code&gt;
就可以使用，升到 3 之后发现会报错：
&lt;code&gt;uninitialized constant XXX::CustomModule&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;然后我把这个 module 文件&lt;code&gt;custom_module.rb&lt;/code&gt;挪到 &lt;code&gt;lib/&lt;/code&gt; 文件夹下，在&lt;code&gt;application.rb&lt;/code&gt;里加上&lt;code&gt;autoload_path&lt;/code&gt;,&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;autoload_paths&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="sx"&gt;%W(&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;root&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sx"&gt;/lib)&lt;/span&gt;
&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;autoload_paths&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="no"&gt;Dir&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;#{&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;root&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;/lib/**/"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;还是不好用？现在能 work 的方法就是在 model 里用&lt;code&gt;require 'custom_module'&lt;/code&gt;, 但似乎不推荐这么加载 module。求助各位有没有解决办法。&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Tue, 20 Aug 2013 13:56:53 +0800</pubDate>
      <link>https://ruby-china.org/topics/13458</link>
      <guid>https://ruby-china.org/topics/13458</guid>
    </item>
    <item>
      <title>iPhone 下 topic 页面 评论的 form 为什么不显示 “上传图片” 的图标</title>
      <description>&lt;p&gt;我发现在 iphone safari 下 帖子底下的评论 form 不显示右边的上传图片图标 但是编辑评论的 form 就显示&lt;/p&gt;

&lt;p&gt;很费解啊，我看代码里两页都是用&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="s2"&gt;"editor_toolbar"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;求指点，我是想在上传图标旁边再加一个“快速插入代码”的功能，网页版显示没问题，不知道是不是就在我的手机上有问题？&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Wed, 07 Aug 2013 10:09:11 +0800</pubDate>
      <link>https://ruby-china.org/topics/13122</link>
      <guid>https://ruby-china.org/topics/13122</guid>
    </item>
    <item>
      <title>偷懒了一个多月 终于完成欧洲蜜月的游记 @ 蝉游记</title>
      <description>&lt;p&gt;偷懒了一个多月 终于完成欧洲蜜月的游记 
罗马 - 佛罗伦萨 - 慕尼黑 - 巴黎 之第一波~ 本人拍照技术一流...烂 求高手指点 
ruby-china 的兄弟们 有空的话帮忙加点人气哈 先谢过~ &lt;/p&gt;

&lt;p&gt;&lt;a href="http://chanyouji.com/trips/49520" rel="nofollow" target="_blank"&gt;http://chanyouji.com/trips/49520&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;感谢蝉游记这么好的创意作品 感谢 &lt;a href="/quakewang" class="user-mention" title="@quakewang"&gt;&lt;i&gt;@&lt;/i&gt;quakewang&lt;/a&gt; 大哥&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Tue, 09 Jul 2013 16:22:27 +0800</pubDate>
      <link>https://ruby-china.org/topics/12375</link>
      <guid>https://ruby-china.org/topics/12375</guid>
    </item>
    <item>
      <title>求学习 Responsive Design 的好资源</title>
      <description>&lt;p&gt;RT，刚搜了一下 Peep Code，似乎没有这方面的教学内容，&lt;/p&gt;

&lt;p&gt;求各位大神推荐资源，最好是也有编程方面的教学内容，包括付费网站。&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Thu, 06 Jun 2013 09:18:01 +0800</pubDate>
      <link>https://ruby-china.org/topics/11529</link>
      <guid>https://ruby-china.org/topics/11529</guid>
    </item>
    <item>
      <title>nested form error in rails 4</title>
      <description>&lt;p&gt;大家好，我在 rails4 里试着用了下 nested form，两个 model 分别是 item 和 tag， 
&lt;code&gt;item has_many tags&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;items_controller 里加了 tags 的白名单：&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="kp"&gt;private&lt;/span&gt;
  &lt;span class="c1"&gt;# Use callbacks to share common setup or constraints between actions.&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;set_item&lt;/span&gt;
    &lt;span class="vi"&gt;@item&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:id&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;     
    &lt;span class="vi"&gt;@item.tags.build&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;

  &lt;span class="c1"&gt;# Never trust parameters from the scary internet, only allow the white list through.&lt;/span&gt;
  &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;item_params&lt;/span&gt;
    &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:item&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;permit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ss"&gt;:name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:price&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:shopping_list_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;tags_attributes: &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:item_id&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;item 的 form 里加了个 fileds_for tags： 
&lt;code&gt;_form.html.erb&lt;/code&gt;&lt;/p&gt;
&lt;pre class="highlight erb"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fields_for&lt;/span&gt; &lt;span class="ss"&gt;:tags&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;tag_form&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"field"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;tag_form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;label&lt;/span&gt; &lt;span class="ss"&gt;:name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Tag:'&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
        &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;tag_form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;text_field&lt;/span&gt; &lt;span class="ss"&gt;:name&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;unless&lt;/span&gt; &lt;span class="n"&gt;tag_form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;nil?&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;tag_form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new_record?&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"field"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;tag_form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;label&lt;/span&gt; &lt;span class="ss"&gt;:_destroy&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Remove:'&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
          &lt;span class="cp"&gt;&amp;lt;%=&lt;/span&gt; &lt;span class="n"&gt;tag_form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;check_box&lt;/span&gt; &lt;span class="ss"&gt;:_destroy&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
      &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
    &lt;span class="cp"&gt;&amp;lt;%&lt;/span&gt; &lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="cp"&gt;%&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;可是当 update item 的时候，&lt;strong&gt;只填写一个 tag 却插入 db 里面 2 个&lt;/strong&gt;，请看控制台输出：&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Started PATCH "/items/1" for 127.0.0.1 at 2013-03-01 17:01:09 +0800
Processing by ItemsController#update as HTML
  Parameters: {"utf8"=&amp;gt;"✓", "authenticity_token"=&amp;gt;"v+V8G8Cu6uUUWIH8PTYO89fOcQDiIA7gSYLkbjygunY=", "item"=&amp;gt;{"name"=&amp;gt;"mac book pro", "description"=&amp;gt;"rMBP", "price"=&amp;gt;"9999.99", "shopping_list_id"=&amp;gt;"1", "tags_attributes"=&amp;gt;{"0"=&amp;gt;{"name"=&amp;gt;"22"}}}, "commit"=&amp;gt;"Update Item", "id"=&amp;gt;"1"}
  Item Load (0.3ms)  SELECT `items`.* FROM `items` WHERE `items`.`id` = 1 LIMIT 1
   (0.1ms)  BEGIN
  SQL (0.3ms)  INSERT INTO `tags` (`created_at`, `item_id`, `updated_at`) VALUES ('2013-03-01 09:01:09', 1, '2013-03-01 09:01:09')
  SQL (0.2ms)  INSERT INTO `tags` (`created_at`, `item_id`, `name`, `updated_at`) VALUES ('2013-03-01 09:01:09', 1, '22', '2013-03-01 09:01:09')
   (10.5ms)  COMMIT
Redirected to http://localhost:3000/items/1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;而且插入的第 1 条数据里面没有 tag name，求助大家有没有遇到过类似情况？&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Fri, 01 Mar 2013 17:00:15 +0800</pubDate>
      <link>https://ruby-china.org/topics/9049</link>
      <guid>https://ruby-china.org/topics/9049</guid>
    </item>
    <item>
      <title>[ZT] 国家队出场：即刻抢票</title>
      <description>&lt;p&gt;"人民网即刻搜索推出抢票工具，用户只需在预售前一天按照提示步骤来完成设置，提交订单，在出票时段关注“抢票”结果即可。如果抢票成功，用户需要在 45 分钟内登录自己的 12306，在未完成订单中完成支付。"&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.jike.com/qiangpiao" rel="nofollow" target="_blank"&gt;http://www.jike.com/qiangpiao&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;过年前的是抢不到了，但是大家可以试试买年后回程的票。&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Mon, 21 Jan 2013 14:09:45 +0800</pubDate>
      <link>https://ruby-china.org/topics/8226</link>
      <guid>https://ruby-china.org/topics/8226</guid>
    </item>
    <item>
      <title>日本 Kyoto 的 RailsGirl</title>
      <description>&lt;p&gt;相册地址，过 2 天北京的活动也给兄弟们 show 一下 RailsGirl 啊！
&lt;a href="http://www.flickr.com/photos/hsbt/sets/72157632257810478/" rel="nofollow" target="_blank"&gt;http://www.flickr.com/photos/hsbt/sets/72157632257810478/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="http://farm9.staticflickr.com/8491/8276782476_21bd136177_b.jpg" title="" alt=""&gt;&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Tue, 18 Dec 2012 14:06:31 +0800</pubDate>
      <link>https://ruby-china.org/topics/7659</link>
      <guid>https://ruby-china.org/topics/7659</guid>
    </item>
    <item>
      <title>请教个地图 API 的问题 [把省划成多个大区]</title>
      <description>&lt;p&gt;咱这里有没有大神搞过地图 API？&lt;/p&gt;

&lt;p&gt;请教：国内的地图 API，哪家的可以轻松把一个省划成若干区域（一个区域包含若干个市）并高亮显示，不要那种几个点画一个多边形，是带行政区划边界的那种 &lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Tue, 27 Nov 2012 17:29:50 +0800</pubDate>
      <link>https://ruby-china.org/topics/7128</link>
      <guid>https://ruby-china.org/topics/7128</guid>
    </item>
    <item>
      <title>RubyConf 2012 啥时候放视频啊？？</title>
      <description>&lt;p&gt;因故没去成 万分遗憾啊~
看 slides 还不过瘾啊  冰天雪地裸奔求 slides 配视频！！！！
有同样遗憾和需求的兄弟们顶起来啊~&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Mon, 19 Nov 2012 10:34:27 +0800</pubDate>
      <link>https://ruby-china.org/topics/6889</link>
      <guid>https://ruby-china.org/topics/6889</guid>
    </item>
    <item>
      <title>今天不想写代码 翻译了一篇文章 Make your own gem</title>
      <description>&lt;p&gt;今天这个会，我们将学习如何把你的 ruby 代码打包成外卖（pia！开会开出瘾了？外卖个头，你个吃货！是 gem 啊！）&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://i3zhe.github.com/blog/2012/10/29/ru-he-zhi-zuo-zi-ji-de-gem/#intro" rel="nofollow" target="_blank" title=""&gt;介绍&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://i3zhe.github.com/blog/2012/10/29/ru-he-zhi-zuo-zi-ji-de-gem/#first_gem" rel="nofollow" target="_blank" title=""&gt;处女 gem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://i3zhe.github.com/blog/2012/10/29/ru-he-zhi-zuo-zi-ji-de-gem/#more-files" rel="nofollow" target="_blank" title=""&gt;包含更多文件&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://i3zhe.github.com/blog/2012/10/29/ru-he-zhi-zuo-zi-ji-de-gem/#executable" rel="nofollow" target="_blank" title=""&gt;添加可执行文件&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#writing-tests" title=""&gt;写测试&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#document-code" title=""&gt;给 gem 写文档&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#wrapup" title=""&gt;总结&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="http://i3zhe.github.com/blog/2012/10/29/ru-he-zhi-zuo-zi-ji-de-gem/" rel="nofollow" target="_blank" title=""&gt;全文链接&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;希望对新手有帮助，欢迎批评指正。&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Mon, 29 Oct 2012 17:47:07 +0800</pubDate>
      <link>https://ruby-china.org/topics/6386</link>
      <guid>https://ruby-china.org/topics/6386</guid>
    </item>
    <item>
      <title>求推荐个国内靠谱服务器商 用于小型商业网站</title>
      <description>&lt;p&gt;有个朋友想做个小型公司展示的网站，内容不多，求推荐个物美价廉的服务器。
PS：他公司在山东
先替他谢谢了。&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Wed, 05 Sep 2012 09:35:14 +0800</pubDate>
      <link>https://ruby-china.org/topics/5368</link>
      <guid>https://ruby-china.org/topics/5368</guid>
    </item>
    <item>
      <title>在 model 里用 ruby-ldap 报错 #&lt;NameError: uninitialized constant User::LDAP&gt;</title>
      <description>&lt;p&gt;如题，我想在 User model 里做 ldap 的验证，可当调用
&lt;code&gt;LDAP:Conn.new(LDAP_HOST, 389)&lt;/code&gt;
时，
会报这个错 
&lt;code&gt;#&amp;lt;NameError: uninitialized constant User::LDAP&amp;gt;&lt;/code&gt;
意思是把 LDAP 当成 User 的属性对象了？ 
请问应该怎么应付这种情况？还是说应该到 controller 里用 LDAP?&lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Wed, 15 Aug 2012 12:08:32 +0800</pubDate>
      <link>https://ruby-china.org/topics/4949</link>
      <guid>https://ruby-china.org/topics/4949</guid>
    </item>
    <item>
      <title>《Getting Real》免费下载了！！ from 37signals</title>
      <description>&lt;p&gt;从推上看到的消息 只需邮箱  收到连接即可免费下载&lt;/p&gt;

&lt;p&gt;&lt;a href="http://gettingreal.37signals.com/" rel="nofollow" target="_blank"&gt;http://gettingreal.37signals.com/&lt;/a&gt;  &lt;/p&gt;</description>
      <author>young4u_amy</author>
      <pubDate>Thu, 24 May 2012 17:03:24 +0800</pubDate>
      <link>https://ruby-china.org/topics/3475</link>
      <guid>https://ruby-china.org/topics/3475</guid>
    </item>
  </channel>
</rss>
