From dd1b3177c999560818e8bbfb549630234f6ec9f0 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Fri, 14 Sep 2012 05:19:38 +0200 Subject: [PATCH] Renamed 'notes/notes_list' partial to 'notes/notes' --- app/views/notes/{_notes_list.html.haml => _notes.html.haml} | 2 +- app/views/notes/index.js.haml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename app/views/notes/{_notes_list.html.haml => _notes.html.haml} (59%) diff --git a/app/views/notes/_notes_list.html.haml b/app/views/notes/_notes.html.haml similarity index 59% rename from app/views/notes/_notes_list.html.haml rename to app/views/notes/_notes.html.haml index e2c4bedc..adb5dfcb 100644 --- a/app/views/notes/_notes_list.html.haml +++ b/app/views/notes/_notes.html.haml @@ -1,4 +1,4 @@ - @notes.each do |note| - next unless note.author - = render "notes/note", note: note + = render "note", note: note diff --git a/app/views/notes/index.js.haml b/app/views/notes/index.js.haml index 8c735476..3d6859eb 100644 --- a/app/views/notes/index.js.haml +++ b/app/views/notes/index.js.haml @@ -1,15 +1,15 @@ - unless @notes.blank? - if loading_more_notes? :plain - NoteList.appendMoreNotes(#{@notes.last.id}, "#{escape_javascript(render 'notes/notes_list')}"); + NoteList.appendMoreNotes(#{@notes.last.id}, "#{escape_javascript(render 'notes/notes')}"); - elsif loading_new_notes? :plain - NoteList.replaceNewNotes("#{escape_javascript(render 'notes/notes_list')}"); + NoteList.replaceNewNotes("#{escape_javascript(render 'notes/notes')}"); - else :plain - NoteList.setContent(#{@notes.last.id}, "#{escape_javascript(render 'notes/notes_list')}"); + NoteList.setContent(#{@notes.last.id}, "#{escape_javascript(render 'notes/notes')}"); - else - if loading_more_notes?