mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-17 04:38:08 +01:00
Merge pull request #163 from kytrinyx/stats-project-view
Simplify stats project view
This commit is contained in:
commit
ae42f9c076
5 changed files with 19 additions and 47 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