mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
leave a note about stat#prune
This commit is contained in:
parent
9c80d5eecd
commit
c2705157c4
1 changed files with 2 additions and 0 deletions
|
@ -945,6 +945,7 @@ class Site < Sequel::Model
|
||||||
((total_space_used.to_f / maximum_space) * 100).round(1)
|
((total_space_used.to_f / maximum_space) * 100).round(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Note: Change Stat#prune! if you change this business logic.
|
||||||
def supporter?
|
def supporter?
|
||||||
owner.plan_type != 'free'
|
owner.plan_type != 'free'
|
||||||
end
|
end
|
||||||
|
@ -966,6 +967,7 @@ class Site < Sequel::Model
|
||||||
!values[:plan_type].match(/plan_/).nil?
|
!values[:plan_type].match(/plan_/).nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Note: Change Stat#prune! if you change this business logic.
|
||||||
def plan_type
|
def plan_type
|
||||||
return 'free' if owner.values[:plan_type].nil?
|
return 'free' if owner.values[:plan_type].nil?
|
||||||
return 'supporter' if owner.values[:plan_type].match /^plan_/
|
return 'supporter' if owner.values[:plan_type].match /^plan_/
|
||||||
|
|
Loading…
Add table
Reference in a new issue