##// END OF EJS Templates
Don't show projects created more than 30 days ago in "Latest projects" (#21148)....
Jean-Philippe Lang -
r14472:328e0767228b
parent child
Show More
@@ -149,7 +149,10 class Project < ActiveRecord::Base
149 149 # returns latest created projects
150 150 # non public projects will be returned only if user is a member of those
151 151 def self.latest(user=nil, count=5)
152 visible(user).limit(count).order("created_on DESC").to_a
152 visible(user).limit(count).
153 order(:created_on => :desc).
154 where("#{table_name}.created_on >= ?", 30.days.ago).
155 to_a
153 156 end
154 157
155 158 # Returns true if the project is visible to +user+ or to the current user.
General Comments 0
You need to be logged in to leave comments. Login now