leave a note about stat#prune

This commit is contained in:
Kyle Drake 2015-04-30 12:53:50 -07:00
parent 9c80d5eecd
commit c2705157c4

View file

@ -945,6 +945,7 @@ class Site < Sequel::Model
((total_space_used.to_f / maximum_space) * 100).round(1)
end
# Note: Change Stat#prune! if you change this business logic.
def supporter?
owner.plan_type != 'free'
end
@ -966,6 +967,7 @@ class Site < Sequel::Model
!values[:plan_type].match(/plan_/).nil?
end
# Note: Change Stat#prune! if you change this business logic.
def plan_type
return 'free' if owner.values[:plan_type].nil?
return 'supporter' if owner.values[:plan_type].match /^plan_/