fix RootR -> HomeR

This commit is contained in:
gregwebs 2012-03-25 08:43:25 -07:00
parent 2baeddd698
commit 2bb39530d6
2 changed files with 5 additions and 5 deletions

View File

@ -14,16 +14,16 @@ getHomeR :: Handler RepHtml
getHomeR = do getHomeR = do
((_, formWidget), formEnctype) <- generateFormPost sampleForm ((_, formWidget), formEnctype) <- generateFormPost sampleForm
let submission = Nothing :: Maybe (FileInfo, Text) let submission = Nothing :: Maybe (FileInfo, Text)
handlerName = "getRootR" :: Text handlerName = "getHomeR" :: Text
defaultLayout $ do defaultLayout $ do
aDomId <- lift newIdent aDomId <- lift newIdent
setTitle "Welcome To Yesod!" setTitle "Welcome To Yesod!"
$(widgetFile "homepage") $(widgetFile "homepage")
postRootR :: Handler RepHtml postHomeR :: Handler RepHtml
postRootR = do postHomeR = do
((result, formWidget), formEnctype) <- runFormPost sampleForm ((result, formWidget), formEnctype) <- runFormPost sampleForm
let handlerName = "postRootR" :: Text let handlerName = "postHomeR" :: Text
submission = case result of submission = case result of
FormSuccess res -> Just res FormSuccess res -> Just res
_ -> Nothing _ -> Nothing

View File

@ -29,7 +29,7 @@
$maybe (info,con) <- submission $maybe (info,con) <- submission
<div .message> <div .message>
Your file's type was <em>#{fileContentType info}</em>. You say it has: <em>#{con}</em> Your file's type was <em>#{fileContentType info}</em>. You say it has: <em>#{con}</em>
<form method=post action=@{RootR}#form enctype=#{formEnctype}> <form method=post action=@{HomeR}#form enctype=#{formEnctype}>
^{formWidget} ^{formWidget}
<input type="submit" value="Send it!"> <input type="submit" value="Send it!">