app/views/stories/_form.html.haml
= form_for(@story) do |f|
- if @story.errors.any?
%div{:id => "error_explanation"}
%h2
= pluralize(@story.errors.count, "error")
prohibited this story from being saved:
%ul
- @story.errors.full_messages.each do |msg|
%li= msg
%div{:class => "field"}
= f.label :title
%br/
= f.text_field :title
%div{:class => "field"}
= f.label :author
%br/
= f.text_field :author
%div{:class=>"field"}
= f.label :body
%br/
= f.text_area :body
%div{:class=>"actions"}
= f.submit
= link_to "Cancel", stories_path
= render :partial => "layouts/markdown_help"