small refactorings of generated javascripts

This commit is contained in:
Reinier Balt 2014-08-10 20:43:27 +02:00
parent 8a3cb66e49
commit 6191cce4c7
33 changed files with 125 additions and 124 deletions

View file

@ -17,9 +17,9 @@ function clear_form() {
}
function html_for_error_messages() {
return "<%= escape_javascript(get_list_of_error_messages_for(@note)) %>";
return "<%= js_error_messages_for(@note) %>";
}
function html_for_note_summary() {
return "<%= @saved ? escape_javascript(render(:partial => 'notes_summary', :object => @note)) : "" %>";
return "<%= @saved ? js_render('notes_summary', {}, @note) : "" %>";
}