diff options
Diffstat (limited to 'app/views/snippets/_form.html.haml')
-rw-r--r-- | app/views/snippets/_form.html.haml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/views/snippets/_form.html.haml b/app/views/snippets/_form.html.haml new file mode 100644 index 0000000..d19ec65 --- /dev/null +++ b/app/views/snippets/_form.html.haml @@ -0,0 +1,15 @@ +.panel.panel-default + .panel-body + = form_for(snippet, url: "/", html: { method: "post" }) do |f| + - if snippet.errors.any? + .alert.alert-danger{:role => "alert"} + %p + = pluralize(snippet.errors.count, "error") + prohibited this snippet from being saved: + %ul + - snippet.errors.full_messages.each do |message| + %li= message + #code-field.form-group + %textarea{name: "snippet[code]", style: "display: none"}= snippet.code + %input{type: "hidden", name: "snippet[language]", value: "Ruby"} + %button.btn.btn-default{type: "submit"} Run |