%= form_with model: [:admin, @book] do |f| %>
<%= f.text_field :title, class: 'form-control', id: 'title' %>
<%= f.text_field :author, class: 'form-control', id: 'author' %>
<%= f.select :genre, Book.genres.keys.map {|genre| [genre.titleize,genre]},{}, class: 'form-control', id: 'genre' %>
<%= f.select :sub_genre, Book.sub_genres.keys.map {|sub_genre| [sub_genre.titleize,sub_genre]},{}, class: 'form-control', id: 'sub_genre' %>
<%= f.number_field :pages, class: 'form-control', id: 'pages' %>
<%= f.number_field :copies, class: 'form-control', id: 'copies' %>
<%= f.submit 'Save', class: 'btn btn-primary'%>
<% end %>