2012-02-24 21:36:44 +01:00
|
|
|
- if note.valid?
|
|
|
|
:plain
|
|
|
|
$("#new_note .errors").remove();
|
|
|
|
$('#new_note textarea').val("");
|
2012-08-11 00:07:50 +02:00
|
|
|
NoteList.prepend(#{note.id}, "#{escape_javascript(render partial: "notes/show", locals: {note: note})}");
|
2012-02-24 21:36:44 +01:00
|
|
|
- else
|
|
|
|
:plain
|
|
|
|
$("#new_note").replaceWith("#{escape_javascript(render('form'))}");
|
|
|
|
|