ability to set custom maximum space

This commit is contained in:
Kyle Drake 2015-08-21 14:42:05 -07:00
parent 0c8bba8114
commit 3035175c4f
3 changed files with 24 additions and 1 deletions

View file

@ -960,7 +960,11 @@ class Site < Sequel::Model
end
def maximum_space
PLAN_FEATURES[(parent? ? self : parent).plan_type.to_sym][:space]
plan_space = PLAN_FEATURES[(parent? ? self : parent).plan_type.to_sym][:space]
return custom_max_space if custom_max_space > plan_space
plan_space
end
def space_percentage_used