Added an env variable that allows maitenance mode (#679)

This commit is contained in:
farhatahmad
2019-07-22 16:45:56 -04:00
committed by Jesus Federico
parent f2373ad21e
commit 02c0d577f8
4 changed files with 23 additions and 1 deletions

View File

@ -22,4 +22,8 @@ class ApplicationRecord < ActiveRecord::Base
def to_param
uid
end
def readonly?
ENV["MAINTENANCE_MODE"] == "readonly"
end
end