<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>fantast_xue (WilliamX)</title>
    <link>https://ruby-china.org/fantast_xue</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>如何让 form_for 中的按钮与外面的按钮在同一列？</title>
      <description>&lt;p&gt;是这样的：有一个编辑框和一个保存按钮，现在想加一个‘Cancel’按钮返回到前一页。想把‘Cancel’和‘Save’按钮挨在一起放在同一行，结果查了很久资料都没有找到方法。erb 中的代码如下：&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;%= form_for :topic, url: topics_path do |f| %&amp;gt;
……
      &amp;lt;%= f.submit value:'Save' %&amp;gt;
&amp;lt;% end %&amp;gt;

&amp;lt;%= button_to 'Cancel', topics_path, class:'button', method: :get %&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;可以给我个思路或指点下资料吗？&lt;/p&gt;</description>
      <author>fantast_xue</author>
      <pubDate>Tue, 29 Jul 2014 11:31:02 +0800</pubDate>
      <link>https://ruby-china.org/topics/20728</link>
      <guid>https://ruby-china.org/topics/20728</guid>
    </item>
  </channel>
</rss>
