Put getExtra in scaffolded Foundation.hs

This commit is contained in:
Michael Snoyman 2012-07-24 10:38:05 +03:00
parent b4d1b2087c
commit 6c834ec0cc

View File

@ -10,6 +10,7 @@ module Foundation
, requireAuth , requireAuth
, module Settings , module Settings
, module Model , module Model
, getExtra
) where ) where
import Prelude import Prelude
@ -149,6 +150,10 @@ instance YesodAuth ~sitearg~ where
instance RenderMessage ~sitearg~ FormMessage where instance RenderMessage ~sitearg~ FormMessage where
renderMessage _ _ = defaultFormMessage renderMessage _ _ = defaultFormMessage
-- | Get the 'Extra' value, used to hold data from the settings.yml file.
getExtra :: Handler Extra
getExtra = fmap (appExtra . settings) getYesod
-- Note: previous versions of the scaffolding included a deliver function to -- Note: previous versions of the scaffolding included a deliver function to
-- send emails. Unfortunately, there are too many different options for us to -- send emails. Unfortunately, there are too many different options for us to
-- give a reasonable default. Instead, the information is available on the -- give a reasonable default. Instead, the information is available on the