【发布时间】:2012-11-06 09:07:00
【问题描述】:
我开始将 simple_form 用于 Rails 应用程序,在转换我的一些表单时,我遇到了一个有两个正在使用的模型,一种嵌入式表单。这可以用 simple_form 实现吗?
<% simple_form_for :topic, :url => forum_topics_path do |t| %>
<%= t.input :name, :label => 'Topic' %></p>
<p>First Post:<br/></p>
Title: <%= text_field :post, :title %> <--- this is where i start having problems
Body: <%= text_area :post, :body %>
<%= t.submit 'Save' %>
谢谢
【问题讨论】: