Minor tweaks for #590

This commit is contained in:
Michael Snoyman 2013-09-01 16:15:03 +03:00
parent f0ba8bb7f3
commit 5642489841
2 changed files with 6 additions and 2 deletions

View File

@ -516,6 +516,10 @@ optionsPersist filts ords toDisplay = fmap mkOptionList $ do
, optionExternalValue = toPathPiece key
}) pairs
-- | An alternative to 'optionsPersist' which returns just the @Key@ instead of
-- the entire @Entity@.
--
-- Since 1.3.2
optionsPersistKey
:: (YesodPersist site
, PersistEntity a
@ -531,7 +535,7 @@ optionsPersistKey
optionsPersistKey filts ords toDisplay = fmap mkOptionList $ do
mr <- getMessageRender
pairs <- runDB $ selectList filts ords
return $ Import.map (\(Entity key value) -> Option
return $ map (\(Entity key value) -> Option
{ optionDisplay = mr (toDisplay value)
, optionInternalValue = key
, optionExternalValue = toPathPiece key

View File

@ -1,5 +1,5 @@
name: yesod-form
version: 1.3.1
version: 1.3.2
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>