Commit 362dc5bc authored by maeda's avatar maeda
Browse files

Use pluck instead of map in MyHelper (#26711).

Patch by jwjw yy.

git-svn-id: e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 5e5e5766
......@@ -78,7 +78,7 @@ module MyHelper
def render_calendar_block(block, settings)
calendar =, current_language, :week) = Issue.visible.
where(:project_id =>
where(:project_id => User.current.projects.pluck(:id)).
where("(start_date>=? and start_date<=?) or (due_date>=? and due_date<=?)", calendar.startdt, calendar.enddt, calendar.startdt, calendar.enddt).
includes(:project, :tracker, :priority, :assigned_to).
references(:project, :tracker, :priority, :assigned_to).
......@@ -139,7 +139,7 @@ module MyHelper
def render_news_block(block, settings)
news = News.visible.
where(:project_id =>
where(:project_id => User.current.projects.pluck(:id)).
includes(:project, :author).
references(:project, :author).
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment