yesodweb / yesod-scaffold

The Yesod scaffolding, with branches for different versions.
MIT License
76 stars 39 forks source link

Document quoting numeric values #98

Closed MaxGabriel closed 9 years ago

MaxGabriel commented 9 years ago

See https://github.com/yesodweb/yesod/issues/1061

MaxGabriel commented 9 years ago

An alternate way to help people find this information would be for me to just open a stackoverflow question about this an answer it; imo that'd actually be better than mentioning it in the yaml file.

creichert commented 9 years ago

Looks good to me. I think it's okay to document it here as well. I wonder if this could be fixed in the yaml package. Thanks!

MaxGabriel commented 9 years ago

Not sure if this is too hacky, but could the database backends be modified to accept either a string or number (then convert the number to a string?). https://github.com/yesodweb/persistent/blob/b5b9e3ac6b69256f080db232ee387affd7fe6890/persistent-postgresql/Database/Persist/Postgresql.hs#L920

snoyberg commented 9 years ago

That would not work for passwords like "+123" or "123.000", which will be rendered differently than they parse.

On Mon, Aug 24, 2015 at 8:33 PM, Maximilian Tagher <notifications@github.com

wrote:

Not sure if this is too hacky, but could the database backends be modified to accept either a string or number (then convert the number to a string?). https://github.com/yesodweb/persistent/blob/b5b9e3ac6b69256f080db232ee387affd7fe6890/persistent-postgresql/Database/Persist/Postgresql.hs#L920

— Reply to this email directly or view it on GitHub https://github.com/yesodweb/yesod-scaffold/pull/98#issuecomment-134309808 .

MaxGabriel commented 9 years ago

Good point