私は次のコードを書きました:
<h1>Add new book</h1>
<%= form_tag :action => 'create' do %>
<p><label for="book_title">Title</label>:
<%= text_field 'book', 'title' %></p>
<p><label for="book_price">Price</label>:
<%= text_field 'book', 'price' %></p>
<p><label for="book_subject">Subject</label>:
<%= collection_select(:book, :subject_id, @subjects, :id, :name) %></p>
<p><label for="book_description">Description</label><br/>
<%= text_area 'book', 'description' %></p>
<%= submit_tag "Create" %>
<%= end %>
<%= link_to 'Back', {:action => 'list'} %>
理由はわかりませんが、何らかの理由で2つのエラーが発生します。
/Developer/Rubyonrails/library/app/views/book/new.html.erb:14: syntax error, unexpected keyword_ensure, expecting ')'
/Developer/Rubyonrails/library/app/views/book/new.html.erb:16: syntax error, unexpected keyword_end, expecting ')'
何故ですか?どうすれば修正できますか?