Created
July 18, 2014 08:09
-
-
Save gentoid/7113da4a3d12c642dd3a to your computer and use it in GitHub Desktop.
simple HAML temlate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= form_for :article, url: articles_path do |f| | |
= @article | |
- if @article.errors.any? | |
#error_explanation | |
%h2 Ошибки при создании статьи: | |
%ul | |
- @article.errors.full_messages.each do |msg| | |
%li | |
= msg | |
%p | |
= f.label 'Заголовок статьи' | |
%br | |
= f.text_field :title | |
%p | |
= f.label 'Текст статьи' | |
%br | |
= f.text_area :body | |
%p | |
= f.submit 'Сохранить', class: 'btn btn-success' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment