Skip to content

Instantly share code, notes, and snippets.

@taichiman
Created April 11, 2015 09:07
Show Gist options
  • Save taichiman/88dfe0e251c2ffd4eaa3 to your computer and use it in GitHub Desktop.
Save taichiman/88dfe0e251c2ffd4eaa3 to your computer and use it in GitHub Desktop.
test rubymine gist system
- if @answer.errors.any?
/- binding.pry
#error_explanation
h4 #{pluralize(@answer.errors.count, "error")} prohibited this answer from being saved:
ul
- @answer.errors.full_messages.each do |msg|
li = msg
=
= form_for [@question, @answer] do |f|
.form-group
= f.label :body, 'Body'
= f.text_area :body, class: 'form-control'
= submit_tag 'Post Your Answer'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment