diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2015-10-15 10:41:09 +0200 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2015-10-15 12:05:01 +0200 |
commit | e5925d073ea09072790856da1569865d5c45e408 (patch) | |
tree | 91eeee3f230002dc97b6a7272d8a023814e1d31a | |
parent | 9f5811116ce56afe8bd2e46d92523e7240670016 (diff) | |
download | gitlab-ce-e5925d073ea09072790856da1569865d5c45e408.tar.gz |
Renamed Note.inc_associations to with_associations
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 2 | ||||
-rw-r--r-- | app/models/note.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 27aa70a992b..97485c101fb 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -57,7 +57,7 @@ class Projects::IssuesController < Projects::ApplicationController def show @participants = @issue.participants(current_user) @note = @project.notes.new(noteable: @issue) - @notes = @issue.notes.inc_associations.fresh + @notes = @issue.notes.with_associations.fresh @noteable = @issue respond_with(@issue) diff --git a/app/models/note.rb b/app/models/note.rb index 196512c4715..dc110f4dc35 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -60,7 +60,7 @@ class Note < ActiveRecord::Base scope :inc_author_project, ->{ includes(:project, :author) } scope :inc_author, ->{ includes(:author) } - scope :inc_associations, -> do + scope :with_associations, -> do includes(:author, :noteable, :updated_by, project: [:project_members, {group: [:group_members]}]) end |