Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="container">
- <h2> Edit Novel Details</h2>
- <%= form_for @novel do |f| %>
- <div class="form-group">
- <%= f.label :title %><br />
- <%= f.text_field :title, class:'form-control' %><br />
- <%= f.label :isbn %><br />
- <%= f.number_field :isbn, class:'form-control' %><br />
- <%= f.label :format %><br />
- <%= f.text_field :format, class:'form-control' %><br />
- <%= f.label :genre %><br />
- <%= f.select :genre_id, Genre.all.collect {|x| [x.name, x.id]}, {:include_blank => 'Select Genre'}, class:'form-control' %><br />
- <%= f.label :author %><br />
- <%= f.select :author_id, Author.all.collect {|x| [x.fname + ' '+ x.lname, x.id]}, {:include_blank => 'Select Author'}, class:'form-control' %><br />
- <%= f.label :publisher %><br />
- <%= f.select :publisher_id, Publisher.all.collect {|x| [x.name, x.id]}, {:include_blank => 'Select Publisher'}, class:'form-control' %><br />
- <%= f.label :price %><br />
- <%= f.text_field :price, class:'form-control' %><br />
- <%= f.label :publication %><br />
- <%= f.text_field :publication, class:'form-control' %><br />
- <%= f.label :description %><br />
- <%= f.text_area :description, class:'form-control' %><br />
- <%= f.label :pages %><br />
- <%= f.text_field :pages, class:'form-control' %><br />
- <%= f.submit "Submit", class:'btn btn-primary' %>
- <%=link_to "Cancel", novels_path, class:'btn btn-default' %>
- <% end %>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement