Add ToJSON and FromJSON for Textarea (fixes #738)
This commit is contained in:
parent
e35836bbc1
commit
96e59947eb
@ -170,7 +170,7 @@ $newline never
|
|||||||
-- | A newtype wrapper around a 'Text' that converts newlines to HTML
|
-- | A newtype wrapper around a 'Text' that converts newlines to HTML
|
||||||
-- br-tags.
|
-- br-tags.
|
||||||
newtype Textarea = Textarea { unTextarea :: Text }
|
newtype Textarea = Textarea { unTextarea :: Text }
|
||||||
deriving (Show, Read, Eq, PersistField, Ord)
|
deriving (Show, Read, Eq, PersistField, Ord, ToJSON, FromJSON)
|
||||||
instance PersistFieldSql Textarea where
|
instance PersistFieldSql Textarea where
|
||||||
sqlType _ = SqlString
|
sqlType _ = SqlString
|
||||||
instance ToHtml Textarea where
|
instance ToHtml Textarea where
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-form
|
name: yesod-form
|
||||||
version: 1.3.8.3
|
version: 1.3.9
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user