<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>hamxiaoz</title>
    <link>https://ruby-china.org/hamxiaoz</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>InfoQ 那个预览演讲是怎么实现的</title>
      <description>&lt;p&gt;就是它的图片是如何和视频同步的？&lt;/p&gt;</description>
      <author>hamxiaoz</author>
      <pubDate>Fri, 14 Mar 2014 23:09:15 +0800</pubDate>
      <link>https://ruby-china.org/topics/17891</link>
      <guid>https://ruby-china.org/topics/17891</guid>
    </item>
    <item>
      <title>Devise + Cancan: 一个 user model 还是 user + admin?</title>
      <description>&lt;p&gt;用 devise 和 cancan, 现在需要创建一般的 user 和 admin. Admin 可以管理 user. 请问这种情况一般是建立一个 user model 还是两个 model: user and admin.
如果只创建一个 model 的话，登陆 form 可以共用一个的吧？&lt;/p&gt;</description>
      <author>hamxiaoz</author>
      <pubDate>Mon, 21 Oct 2013 01:27:01 +0800</pubDate>
      <link>https://ruby-china.org/topics/14895</link>
      <guid>https://ruby-china.org/topics/14895</guid>
    </item>
    <item>
      <title>想添加一个 blog 功能给现有网站, 用 refinery?</title>
      <description>&lt;p&gt;已有网站，已有 user model, 想添加一个 blog 功能可以让用户发表 blog.
看了下 refinerycms 似乎是个不错的选择，但是好像是挺臃肿的.
请教下大家一般怎么做的？&lt;/p&gt;

&lt;p&gt;想要的 blog 功能：&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;支持文字和图片&lt;/li&gt;
&lt;li&gt;支持 tags&lt;/li&gt;
&lt;li&gt;支持评论。&lt;/li&gt;
&lt;/ul&gt;</description>
      <author>hamxiaoz</author>
      <pubDate>Sun, 18 Aug 2013 06:59:48 +0800</pubDate>
      <link>https://ruby-china.org/topics/13409</link>
      <guid>https://ruby-china.org/topics/13409</guid>
    </item>
    <item>
      <title>学习 Rails 的心态</title>
      <description>&lt;p&gt;本人 rails 新手一枚。在看 Ruby on Rails Guides. 发现很多东西我都是在依葫芦画瓢，感觉底层 rails 做了很多东西。比如 controller 里面，没写几行代码，怎么就把 post 给显示出来了。&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;show&lt;/span&gt;
  &lt;span class="vi"&gt;@post&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;Post&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="n"&gt;respond_to&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
    &lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;html&lt;/span&gt; &lt;span class="c1"&gt;# show.html.erb&lt;/span&gt;
    &lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;xml&lt;/span&gt;  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt; &lt;span class="ss"&gt;:xml&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="vi"&gt;@post&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;我是做 C# C++ 桌面程序的，所以感觉 Rails 用起来有很大不同，很多东西，我都不知道去哪里找它背后的实现。&lt;/p&gt;

&lt;p&gt;我在想，是不是学 rails 甚至是用 rails 的时候就要抱着这样的心态：
&lt;strong&gt;把 business 的逻辑给表达出来就可以了，其它的具体实现就靠 rails 来解决了。&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Rails 砖家老师么，你们开始学习时是不是也有这样的疑惑？&lt;/p&gt;</description>
      <author>hamxiaoz</author>
      <pubDate>Thu, 28 Feb 2013 14:07:06 +0800</pubDate>
      <link>https://ruby-china.org/topics/9015</link>
      <guid>https://ruby-china.org/topics/9015</guid>
    </item>
  </channel>
</rss>
