From 4fc66ead4f50f76efb80e119bbedc7514602f57f Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Fri, 14 Sep 2012 05:13:26 +0200 Subject: [PATCH] Rename 'notes/show' partial to 'notes/note' --- app/views/notes/_create_common_note.js.haml | 2 +- app/views/notes/{_show.html.haml => _note.html.haml} | 0 app/views/notes/_notes_list.html.haml | 2 +- app/views/notes/_per_line_show.html.haml | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename app/views/notes/{_show.html.haml => _note.html.haml} (100%) diff --git a/app/views/notes/_create_common_note.js.haml b/app/views/notes/_create_common_note.js.haml index 0a00bd40..bbebc247 100644 --- a/app/views/notes/_create_common_note.js.haml +++ b/app/views/notes/_create_common_note.js.haml @@ -5,7 +5,7 @@ $('.note-form-holder #preview-link').text('Preview'); $('.note-form-holder #preview-note').hide(); $('.note-form-holder').show(); - NoteList.appendNewNote(#{note.id}, "#{escape_javascript(render "notes/show", note: note)}"); + NoteList.appendNewNote(#{note.id}, "#{escape_javascript(render "notes/note", note: note)}"); - else :plain diff --git a/app/views/notes/_show.html.haml b/app/views/notes/_note.html.haml similarity index 100% rename from app/views/notes/_show.html.haml rename to app/views/notes/_note.html.haml diff --git a/app/views/notes/_notes_list.html.haml b/app/views/notes/_notes_list.html.haml index 5673988d..e2c4bedc 100644 --- a/app/views/notes/_notes_list.html.haml +++ b/app/views/notes/_notes_list.html.haml @@ -1,4 +1,4 @@ - @notes.each do |note| - next unless note.author - = render partial: "notes/show", locals: {note: note} + = render "notes/note", note: note diff --git a/app/views/notes/_per_line_show.html.haml b/app/views/notes/_per_line_show.html.haml index 9d5a31a7..28bcd6e0 100644 --- a/app/views/notes/_per_line_show.html.haml +++ b/app/views/notes/_per_line_show.html.haml @@ -1,5 +1,5 @@ %tr.line_notes_row %td{colspan: 3} %ul - = render "notes/show", note: note + = render "notes/note", note: note