pic_vert_app/app/views/admin/topics/_form.html.haml
2013-06-29 23:10:44 +02:00

20 lines
471 B
Plaintext

= form_for [:admin, @topic] do |f|
-if @topic.errors.any?
#error_explanation
%h2= "#{pluralize(@topic.errors.count, "error")} prohibited this topic from being saved:"
%ul
- @topic.errors.full_messages.each do |msg|
%li= msg
.field
= f.label :title
= f.text_field :title
.field
= f.label :description
= f.text_area :description
.field
= f.label :user
= f.text_field :user
.actions
= f.submit 'Save'