<%= form_for([@post, @post.bids.build]),
:url => { :action => "offer_bid" } do |f| %>
<%= f.submit "Offer Post to this user" %>
<% end %>
我正试图使用上述表单更新bid模型的一个特定列(bid是post下嵌套的模型):-
resources :posts do
resources :bids
end
我已经有一个新的表格创建一行投标模型。
但是在尝试使用上面的表单时出现了以下语法错误。:-
compile error
/home/saran/work_space/rails_apps/incomplete_bid_excercise/app/views
/bids/_offer_bid.html.erb:1: syntax error, unexpected tASSOC, expecting kEND
...st, @post.bids.build]),:url => { :action => "offer_bid" } do...
^
/home/saran/work_space/rails_apps/incomplete_bid_excercise/app/views
/bids/_offer_bid.html.erb:1: syntax error, unexpected kDO, expecting kEND
... { :action => "offer_bid" } do |f| @output_buffer.safe_conca...
^
/home/saran/work_space/rails_apps/incomplete_bid_excercise/app/views
/bids/_offer_bid.html.erb:7: syntax error, unexpected kENSURE, expecting $end
提前谢谢:)。