My View:
<div class="field">
<%= label :isbn_exist, 'ISBN' %>
<%= text_field :isbn_exist,'ISBN' %>
</div>
<%= link_to 'Add new book', new_book_path(:isbn_exist => @isbn_exist), :class => "btn btn-warning"%>
This “:isbn_exist” variable is not sent to the controller. why? If i put a number instead of @isbn_exist this value is sent. I think the text_field is not saving the value on the :isbn_exist variable…
You have a
text_fieldand a link. What you really want is aform(including thistext_field) and asubmitbutton.Things like this are covered in every rails tutorial you can find.