Minor tweaks for #590
This commit is contained in:
parent
f0ba8bb7f3
commit
5642489841
@ -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
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user