Book's Model is singular(book) and in the db is plural(books)
rails c
Item.connection
Item – see all fields and types of fields
Item.first | Item.last | Item.find(3) – find by id
<% if user_signed_in? %>
<% if @item.user_id == current_user.id %>
<%= link_to “Edit”, edit_item_path(@item) %>
<%= link_to “Delete”, item_path(@item), method: :delete, data: { confirm: “Are you sure” } %>
<% end %>
<% end %>
This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
-
Ruby version
-
System dependencies
-
Configuration
-
Database creation
-
Database initialization
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions
-
...