Commit d49645a01348e093b87586b3575e93233d497aea

Authored by gitlabhq
1 parent 24f04c0a

fixed wall --all option

Showing 1 changed file with 8 additions and 9 deletions   Show diff stats
app/controllers/projects_controller.rb
@@ -83,16 +83,15 @@ class ProjectsController < ApplicationController @@ -83,16 +83,15 @@ class ProjectsController < ApplicationController
83 # 83 #
84 84
85 def wall 85 def wall
86 - @date = case params[:view]  
87 - when "week" then Date.today - 7.days  
88 - when "all" then nil  
89 - when "day" then Date.today  
90 - else nil  
91 - end  
92 -  
93 - @notes = @project.common_notes.order("created_at DESC")  
94 - @notes = @date ? @notes.since(@date.at_beginning_of_day) : @notes.fresh.limit(10)  
95 @note = Note.new 86 @note = Note.new
  87 + @notes = @project.common_notes.order("created_at DESC")
  88 +
  89 + @notes = case params[:view]
  90 + when "week" then @notes.since((Date.today - 7.days).at_beginning_of_day)
  91 + when "all" then @notes.all
  92 + when "day" then @notes.since(Date.today.at_beginning_of_day)
  93 + else @notes.fresh.limit(10)
  94 + end
96 end 95 end
97 96
98 # 97 #