天天看點

ROR ERROR:Couldn't find Book without an ID

Here are two solution :

1:

change

<form action="../update/" method="POST">

to

<form action="../update/<%[email protected]%>" method="POST">

2:

change

<input id="book_id" name="book[id]" size="30" type="hidden" value="<%[email protected]%>"/>

to

<input id="id" name="book[id]" size="30" type="hidden" value="<%[email protected]%>"/>

繼續閱讀