部分被命名为new_campaign_partial.rhtml。它只有用于创建某些文本字段和日历的html代码
<div id="new_campaign"
<%render :partial =>'new_campaign_partial'%>
</div>
<%= link_to_function "Add a campaign" do |page|
inser_html :bottom, :new_campaign, :partial=>'new_campaign_partial'
end%>
将inser_html
更改为page.insert_html
Ref :- insert_html
<%= link_to_function "Add a campaign" do |page|
page.insert_html :bottom, :new_campaign, :partial=>'new_campaign_partial'
end %>