<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>fortunezhang</title>
    <link>https://ruby-china.org/fortunezhang</link>
    <description/>
    <language>en-us</language>
    <item>
      <title>RubyMine 假死 求解决方法</title>
      <description>&lt;p&gt;我在 Linux 下用 rubymine 开发 rails，感觉这个 ide 相当好使。但是不爽的是，总是用着用着键盘就不能使用了，这里指的是不能够输入任何的内容。但是用鼠标复制粘贴是可以的。不知道是什么情况。
机器是两年恰买的。配置大概是是 i3 处理器，8g 内存。操作系统是 Linux mint 14。求解决办法。&lt;/p&gt;</description>
      <author>fortunezhang</author>
      <pubDate>Wed, 05 Jun 2013 19:01:35 +0800</pubDate>
      <link>https://ruby-china.org/topics/11514</link>
      <guid>https://ruby-china.org/topics/11514</guid>
    </item>
    <item>
      <title>rails 中多表关联的问题</title>
      <description>&lt;p&gt;是这样的，我有一个用户表 User:name,pwd，一个新闻表 News：title，content，author，还有一个评论表 Comment：commenter_id ,content ,同时他属于 news 和 user，&lt;/p&gt;

&lt;p&gt;当我显示文章及其所有评论的时候，我这样的，比如说 news/1，来显示文章内容，显示评论是 &lt;a href="/news.comment.each" class="user-mention" title="@news.comment.each"&gt;&lt;i&gt;@&lt;/i&gt;news.comment.each&lt;/a&gt; 来显示，创建一个 comment 时，是 &lt;a href="/news" class="user-mention" title="@news"&gt;&lt;i&gt;@&lt;/i&gt;news&lt;/a&gt; = News.find(params[:news_id])
    &lt;a href="/comment" class="user-mention" title="@comment"&gt;&lt;i&gt;@&lt;/i&gt;comment&lt;/a&gt; = &lt;a href="/news.comments.create" class="user-mention" title="@news.comments.create"&gt;&lt;i&gt;@&lt;/i&gt;news.comments.create&lt;/a&gt;(:commenter_id=&amp;gt;1,:content=&amp;gt; params[:comment]['content'],:is_show_public=&amp;gt; false,:user_id =&amp;gt;&lt;a href="/user.id" class="user-mention" title="@user.id"&gt;&lt;i&gt;@&lt;/i&gt;user.id&lt;/a&gt; )&lt;/p&gt;

&lt;p&gt;，我想问的是，怎么显示评论的时候，显示这个评论是谁写的。我是这样想的，根据 comment 可以得到 user_id ,事实上是 nil，然后根据这个 user_id 去得到 user 的 name，怎么操作。
或者可以给个参考也行。提前谢过。&lt;/p&gt;</description>
      <author>fortunezhang</author>
      <pubDate>Thu, 30 May 2013 20:43:09 +0800</pubDate>
      <link>https://ruby-china.org/topics/11357</link>
      <guid>https://ruby-china.org/topics/11357</guid>
    </item>
  </channel>
</rss>
