<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>suntianxiang (孙天相)</title>
    <link>https://ruby-china.org/suntianxiang</link>
    <description/>
    <language>en-us</language>
    <item>
      <title>我在 controller 目录下创建了一个目录，请问怎么访问这个目录底下的控制器</title>
      <description>&lt;p&gt;apps/
       controllers/
                       test/
                             test_controller.rb
             目录结构就像这样，我应该怎么写 url 啊。&lt;/p&gt;</description>
      <author>suntianxiang</author>
      <pubDate>Thu, 06 Nov 2014 12:12:45 +0800</pubDate>
      <link>https://ruby-china.org/topics/22523</link>
      <guid>https://ruby-china.org/topics/22523</guid>
    </item>
    <item>
      <title>怎么获取上传文件的大小 undefined method `length'</title>
      <description>&lt;p&gt;我的 action
def updeal
    file = params["upfile"]
    detail = "type" + file.content_type.strip
    if file.length &amp;gt; 1
      File.open('a.txt',"wb+") do |f|
        f.write(file.read)
      end
    end
    render(:text =&amp;gt;detail)
  end
为啥不能用 length 方法？还有啥方法获得吗&lt;/p&gt;</description>
      <author>suntianxiang</author>
      <pubDate>Mon, 20 Oct 2014 15:07:49 +0800</pubDate>
      <link>https://ruby-china.org/topics/22136</link>
      <guid>https://ruby-china.org/topics/22136</guid>
    </item>
  </channel>
</rss>
