mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-13 10:54:23 +01:00
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:
parent
6385059de8
commit
2686a0d3b5
3 changed files with 14 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue