Improve tracks CRUD
* Add index, edit and update action; * Add _form partial; * Add link to tracks/index in nav; * Refactor specs.
This commit is contained in:
13
app/views/tracks/_form.html.haml
Normal file
13
app/views/tracks/_form.html.haml
Normal file
@@ -0,0 +1,13 @@
|
||||
= form_for @track, html: { multipart: true } do |t|
|
||||
%table
|
||||
%tbody
|
||||
%tr
|
||||
%th= t.label :name
|
||||
%td= t.text_field :name
|
||||
- if @track.new_record?
|
||||
%tr
|
||||
%th= t.label :file
|
||||
%td= t.file_field :file
|
||||
%tfoot
|
||||
%tr
|
||||
%td= t.submit submit_text
|
||||
Reference in New Issue
Block a user