app/views/keywords/edit.html.haml
#keyword_form
%h1
Edit Keyword
= @keyword.name
= form_for @keyword, url: keyword_path(name: @keyword.name) do |f|
- if @keyword.errors.any?
.alert.alert-warning
%strong
= pluralize(@keyword.errors.count, 'error')
prohibited this keyword from being saved:
%ul
- @keyword.errors.full_messages.each do |msg|
%li
= msg
.form-group
= f.label('Description (maximum 255 characters)')
= f.text_area :description, maxlength: "255", rows: 5, id: 'keyword_description', class: 'form-control input-lg markdown-source-text'
.form-group
= f.label('Keyword Logo (Will be resized to 150x150 Pixels)')
= f.file_field :avatar
= f.submit class: 'btn btn-success pull-right'