Don't link to null projects

If you have fewer than 10 projects, then empty running projects were
linked to with the path `/projects/-1`.

Copy/pasted the list strategy from the other project sections in the
same partial so the duplication becomes explicit.
This commit is contained in:
Katrina Owen 2013-03-02 00:19:47 -05:00
parent 6385059de8
commit 2686a0d3b5
3 changed files with 14 additions and 14 deletions

View file

@ -145,6 +145,10 @@ class Project < ActiveRecord::Base
@new_record_before_save
end
def age_in_days
@age_in_days ||= (Date.today - created_at.to_date + 1).to_i
end
end
class NullProject