gitlabhq/app/views/notes/_create_common.js.haml
Robert Speicher 7754189187 Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
2012-08-10 18:25:15 -04:00

10 lines
299 B
Plaintext

- if note.valid?
:plain
$("#new_note .errors").remove();
$('#new_note textarea').val("");
NoteList.prepend(#{note.id}, "#{escape_javascript(render partial: "notes/show", locals: {note: note})}");
- else
:plain
$("#new_note").replaceWith("#{escape_javascript(render('form'))}");