<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>wxliuzifan (hey)</title>
    <link>https://ruby-china.org/wxliuzifan</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>大家懂 interface testing 么</title>
      <description>&lt;p&gt;如题，有人懂得么，给点意见，不知道怎么写，要写什么东西。可能 类似这样的&lt;img src="https://l.ruby-china.com/photo/2016/88559bc8b5918ce89070661be06996d0.png" title="" alt=""&gt;谢谢啊&lt;/p&gt;</description>
      <author>wxliuzifan</author>
      <pubDate>Mon, 01 Feb 2016 06:47:16 +0800</pubDate>
      <link>https://ruby-china.org/topics/28917</link>
      <guid>https://ruby-china.org/topics/28917</guid>
    </item>
    <item>
      <title>rails 如何换成 mysql 数据库</title>
      <description>&lt;p&gt;rails 如何把 sqlite3 换成 mysql 数据库，我项目做了一半，现在还能换么，还有如果能换要不要安装 mysql。。我的毕业设计，要把安卓端和网页端做到数据同步，该怎么弄。。。&lt;/p&gt;</description>
      <author>wxliuzifan</author>
      <pubDate>Mon, 23 Mar 2015 07:27:54 +0800</pubDate>
      <link>https://ruby-china.org/topics/24787</link>
      <guid>https://ruby-china.org/topics/24787</guid>
    </item>
    <item>
      <title>新手求教，关于购物车商品数量加减设置！</title>
      <description>&lt;p&gt;如题。。。怎么设置购物车商品数量，view 里标签怎么写&lt;/p&gt;</description>
      <author>wxliuzifan</author>
      <pubDate>Wed, 11 Feb 2015 01:37:33 +0800</pubDate>
      <link>https://ruby-china.org/topics/24211</link>
      <guid>https://ruby-china.org/topics/24211</guid>
    </item>
    <item>
      <title>rails 里面如何 set angular js</title>
      <description>&lt;p&gt;试了好多都没用，cmd 里面好像什么 routes 问题有，。。。&lt;/p&gt;</description>
      <author>wxliuzifan</author>
      <pubDate>Tue, 03 Feb 2015 07:36:01 +0800</pubDate>
      <link>https://ruby-china.org/topics/24083</link>
      <guid>https://ruby-china.org/topics/24083</guid>
    </item>
    <item>
      <title>怎么判断 params 传递进来的值为空格</title>
      <description>&lt;p&gt;如题。。。求大神&lt;/p&gt;</description>
      <author>wxliuzifan</author>
      <pubDate>Mon, 02 Feb 2015 17:37:25 +0800</pubDate>
      <link>https://ruby-china.org/topics/24072</link>
      <guid>https://ruby-china.org/topics/24072</guid>
    </item>
    <item>
      <title>order_id 我该怎么存进去，新手求帮助。。。</title>
      <description>&lt;p&gt;我把 product，orderitems 和 orders 三个模型，orderitems 里面只能存进去 produc_id，没有 order_id，有人能帮我看一下么。。。
orderitems 代码如下。。
‘’‘ruby
class OrderitemsController &amp;lt; ApplicationController&lt;/p&gt;

&lt;p&gt;# def new
 #      &lt;a href="/orderitem" class="user-mention" title="@orderitem"&gt;&lt;i&gt;@&lt;/i&gt;orderitem&lt;/a&gt; = Orderitem.new
    # end
    def create
      &lt;a href="/order" class="user-mention" title="@order"&gt;&lt;i&gt;@&lt;/i&gt;order&lt;/a&gt; = Order.new
      product = Product.find(params[:product_id])
      &lt;a href="/orderitem" class="user-mention" title="@orderitem"&gt;&lt;i&gt;@&lt;/i&gt;orderitem&lt;/a&gt; = &lt;a href="/order.orderitems.bui" class="user-mention" title="@order.orderitems.bui"&gt;&lt;i&gt;@&lt;/i&gt;order.orderitems.bui&lt;/a&gt;ld(product: product)
      if &lt;a href="/orderitem.save" class="user-mention" title="@orderitem.save"&gt;&lt;i&gt;@&lt;/i&gt;orderitem.save&lt;/a&gt;
        redirect_to new_order_path
      else
        render 'new'
      end
    end
end
’‘’&lt;/p&gt;</description>
      <author>wxliuzifan</author>
      <pubDate>Thu, 04 Dec 2014 23:03:38 +0800</pubDate>
      <link>https://ruby-china.org/topics/23034</link>
      <guid>https://ruby-china.org/topics/23034</guid>
    </item>
    <item>
      <title>rails session 怎么使用的呢</title>
      <description>&lt;p&gt;我现在 product，orderitems 和 order，orderitem 里面存不进去 order 的 id，老师说要用 session 和 cookie 但是我不会啊啊啊啊。。。。
有人能教教我么，购物车的那个看过了，自己改改貌似没多大用。。。。&lt;/p&gt;</description>
      <author>wxliuzifan</author>
      <pubDate>Wed, 03 Dec 2014 07:34:43 +0800</pubDate>
      <link>https://ruby-china.org/topics/22990</link>
      <guid>https://ruby-china.org/topics/22990</guid>
    </item>
    <item>
      <title>这个是什么问题，google 都没用。。。</title>
      <description>&lt;p&gt;&lt;img src="https://l.ruby-china.com/photo/2014/4f4121d8f210351022d9ecee46dd5073.jpg" title="" alt=""&gt;&lt;/p&gt;</description>
      <author>wxliuzifan</author>
      <pubDate>Mon, 01 Dec 2014 07:35:03 +0800</pubDate>
      <link>https://ruby-china.org/topics/22950</link>
      <guid>https://ruby-china.org/topics/22950</guid>
    </item>
    <item>
      <title>怎么把 user_id 存进去。。。，新人求教</title>
      <description>&lt;p&gt;comments_controller：
def create
     &lt;a href="/product" class="user-mention" title="@product"&gt;&lt;i&gt;@&lt;/i&gt;product&lt;/a&gt; = Product.find(params[:product_id])&lt;/p&gt;

&lt;p&gt;&lt;a href="/comment" class="user-mention" title="@comment"&gt;&lt;i&gt;@&lt;/i&gt;comment&lt;/a&gt; = &lt;a href="/product.comments.cre" class="user-mention" title="@product.comments.cre"&gt;&lt;i&gt;@&lt;/i&gt;product.comments.cre&lt;/a&gt;ate(comment_params)
     &lt;a href="/comment.user_id" class="user-mention" title="@comment.user_id"&gt;&lt;i&gt;@&lt;/i&gt;comment.user_id&lt;/a&gt; = current_user.id
     redirect_to product_path(&lt;a href="/product" class="user-mention" title="@product"&gt;&lt;i&gt;@&lt;/i&gt;product&lt;/a&gt;)
end&lt;/p&gt;

&lt;p&gt;comment——model
class Comment &amp;lt; ActiveRecord::Base
    belongs_to :product&lt;br&gt;
    belongs_to :user
    validates :product_id, presence: true
    validates :content, presence: true, length: { maximum: 140 }
end&lt;/p&gt;

&lt;p&gt;现在数据库中有 product_id 和 user_id，product_id 能够存进去而 user_id 我不知道该怎么存进去。。。。&lt;/p&gt;</description>
      <author>wxliuzifan</author>
      <pubDate>Sat, 29 Nov 2014 23:58:32 +0800</pubDate>
      <link>https://ruby-china.org/topics/22936</link>
      <guid>https://ruby-china.org/topics/22936</guid>
    </item>
    <item>
      <title>新学 Rails，求教</title>
      <description>&lt;p&gt;我用
rails generate scaffold Products title：string imag-url：string price：decimal 这个语句想做成商品添加的功能，但是他的图片应该怎么弄上去啊，看了老版的书根本不行啊....还有在 model 里面的那些关于 product 的东西应该怎么写，谢了啊...&lt;/p&gt;</description>
      <author>wxliuzifan</author>
      <pubDate>Fri, 14 Nov 2014 07:19:35 +0800</pubDate>
      <link>https://ruby-china.org/topics/22666</link>
      <guid>https://ruby-china.org/topics/22666</guid>
    </item>
    <item>
      <title>初学 rspec mock 想问 each 方法怎么测试。。。</title>
      <description>&lt;p&gt;比如说这段代码
isbns = ""
        books.each do |p|
          isbns.insert(0,"#{p.isbn}_")
        end
谢啦。。&lt;/p&gt;</description>
      <author>wxliuzifan</author>
      <pubDate>Mon, 10 Nov 2014 19:58:00 +0800</pubDate>
      <link>https://ruby-china.org/topics/22593</link>
      <guid>https://ruby-china.org/topics/22593</guid>
    </item>
  </channel>
</rss>
