don't fail in foodsoft_config without database,

and use proper config defaults so that configuration editing has
sensible default values
This commit is contained in:
wvengen 2014-06-21 12:52:50 +02:00
parent 7b000c39eb
commit 90f60595e6
3 changed files with 13 additions and 6 deletions

View file

@ -4,8 +4,8 @@ require "deface"
module FoodsoftMessages
# Return whether messages are used or not.
# Enabled by default since it used to be part of the foodsoft core.
# Enabled by default in {FoodsoftConfig} since it used to be part of the foodsoft core.
def self.enabled?
FoodsoftConfig[:use_messages] != false
FoodsoftConfig[:use_messages]
end
end