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

@ -6,8 +6,8 @@ require 'foodsoft_wiki/engine'
module FoodsoftWiki
# Return whether the wiki is 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_wiki] != false
FoodsoftConfig[:use_wiki]
end
end