From 6c834ec0cc0f76964ae6b5a70c0819fb7c5e6865 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Tue, 24 Jul 2012 10:38:05 +0300 Subject: [PATCH] Put getExtra in scaffolded Foundation.hs --- yesod/scaffold/Foundation.hs.cg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/yesod/scaffold/Foundation.hs.cg b/yesod/scaffold/Foundation.hs.cg index 41f05973..ddbd07be 100644 --- a/yesod/scaffold/Foundation.hs.cg +++ b/yesod/scaffold/Foundation.hs.cg @@ -10,6 +10,7 @@ module Foundation , requireAuth , module Settings , module Model + , getExtra ) where import Prelude @@ -149,6 +150,10 @@ instance YesodAuth ~sitearg~ where instance RenderMessage ~sitearg~ FormMessage where 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 -- send emails. Unfortunately, there are too many different options for us to -- give a reasonable default. Instead, the information is available on the