<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>huangpuxiang</title>
    <link>https://ruby-china.org/huangpuxiang</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>validates :title, presence: true 中的 presence 是方法吗？</title>
      <description>&lt;p&gt;因为在 rails guides 文档中提到，数据验证辅助方法有很多：
acceptance\
validates_associated\
confirmation\
exclusion 等等
但是这些方法的书写形式 validates :title, presence: true 是像这样的，其中 presence 像是散列的:key，而 true 相当于 value,
所以有疑问这些辅助的验证方法：是方法还是:key?&lt;/p&gt;</description>
      <author>huangpuxiang</author>
      <pubDate>Fri, 27 Oct 2017 00:53:50 +0800</pubDate>
      <link>https://ruby-china.org/topics/34439</link>
      <guid>https://ruby-china.org/topics/34439</guid>
    </item>
    <item>
      <title>rails db:migrate 用于调用所有未运行的迁移中的 chagne 或 up 方法，那么其中的 down 不会运行吗？</title>
      <description>&lt;p&gt;1、在 rails guides 的 Active Record 章节中写道：
rails db:migrate&amp;nbsp;任务，用于调用所有未运行的迁移中的&amp;nbsp;chagne&amp;nbsp;或&amp;nbsp;up&amp;nbsp;方法，
那么在新的迁移中写的 down 方法就不会运行吗？
2、而在介绍 up 和 down 时写道：
如果调用 up 方法之后紧接着调用 down 方法，数据库模式不会发生任何改变。
这句话不是很上面矛盾了吗？&lt;/p&gt;</description>
      <author>huangpuxiang</author>
      <pubDate>Wed, 30 Aug 2017 19:27:40 +0800</pubDate>
      <link>https://ruby-china.org/topics/33983</link>
      <guid>https://ruby-china.org/topics/33983</guid>
    </item>
    <item>
      <title>rails 中的 table 和 database 是一个概念吗？</title>
      <description>&lt;p&gt;model 既不是资料库 database 也不是资料表 table，所以它们是一个东西吗？源自（&lt;a href="http://railsbook.tw/chapters/16-model-basic.html" rel="nofollow" target="_blank"&gt;http://railsbook.tw/chapters/16-model-basic.html&lt;/a&gt;）&lt;/p&gt;</description>
      <author>huangpuxiang</author>
      <pubDate>Sat, 08 Jul 2017 21:29:31 +0800</pubDate>
      <link>https://ruby-china.org/topics/33434</link>
      <guid>https://ruby-china.org/topics/33434</guid>
    </item>
  </channel>
</rss>
