From 39ba934c0a65f571214998e056e925b61f389360 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 3 Jan 2013 21:09:18 +0200 Subject: REpostiry, Team models --- app/contexts/notes/load_context.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/contexts/notes/load_context.rb') diff --git a/app/contexts/notes/load_context.rb b/app/contexts/notes/load_context.rb index 9f8299f52f7..05626c31a25 100644 --- a/app/contexts/notes/load_context.rb +++ b/app/contexts/notes/load_context.rb @@ -18,7 +18,7 @@ module Notes project.snippets.find(target_id).notes.fresh when "wall" # this is the only case, where the order is DESC - project.common_notes.order("created_at DESC, id DESC").limit(50) + project.notes.common.inc_author_project.order("created_at DESC, id DESC").limit(50) end @notes = if after_id -- cgit v1.2.1 From dccd8b6eaa8b2e98b0245262a8e39df8fb8ae634 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 4 Jan 2013 08:43:25 +0200 Subject: Continue refactoring. Use repostory and team --- app/contexts/notes/load_context.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/contexts/notes/load_context.rb') diff --git a/app/contexts/notes/load_context.rb b/app/contexts/notes/load_context.rb index 05626c31a25..907c7c7ade2 100644 --- a/app/contexts/notes/load_context.rb +++ b/app/contexts/notes/load_context.rb @@ -9,7 +9,7 @@ module Notes @notes = case target_type when "commit" - project.commit_notes(project.commit(target_id)).fresh.limit(20) + project.commit_notes(project.repository.commit(target_id)).fresh.limit(20) when "issue" project.issues.find(target_id).notes.inc_author.fresh.limit(20) when "merge_request" -- cgit v1.2.1 From 5a214ee6f198a90f41a54b3dd7f2ff6a318a8deb Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Sat, 5 Jan 2013 13:11:15 +0200 Subject: Remove unused methods --- app/contexts/notes/load_context.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/contexts/notes/load_context.rb') diff --git a/app/contexts/notes/load_context.rb b/app/contexts/notes/load_context.rb index 907c7c7ade2..a8f617a782b 100644 --- a/app/contexts/notes/load_context.rb +++ b/app/contexts/notes/load_context.rb @@ -9,7 +9,7 @@ module Notes @notes = case target_type when "commit" - project.commit_notes(project.repository.commit(target_id)).fresh.limit(20) + project.notes.for_commit_id(target_id).not_inline.fresh.limit(20) when "issue" project.issues.find(target_id).notes.inc_author.fresh.limit(20) when "merge_request" -- cgit v1.2.1