weathermen/soundstorm

View on GitHub
app/views/tracks/_fields.html.haml

Summary

Maintainability
Test Coverage
.form__field
  = f.label :name
  = f.text_field :name, required: true, class: 'track-name'
- if f.object.new_record?
  .form__field
    = f.label :audio
    = f.direct_upload_file_field :audio, required: true, class: 'track-audio'
    %span.form__hint.form__hint--hidden{ data: { target: 'upload.progress' } }
      Progress 0%
.form__field
  = f.label :downloadable
  = f.check_box :downloadable, class: 'track-downloadable'
.form__field.form__field--textarea
  = f.label :description
  = f.text_area :description, class: 'track-description'