Fixed comments for snippets. Tests fixed
This commit is contained in:
parent
d41d8ffb02
commit
292a41cbe2
7 changed files with 26 additions and 24 deletions
9
app/views/notes/_create_common.js.haml
Normal file
9
app/views/notes/_create_common.js.haml
Normal file
|
@ -0,0 +1,9 @@
|
|||
- 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'))}");
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue