Closed hovsater closed 8 years ago
It makes sense to me to treat them the same as Strings, which would try to select and fill_in at least.
On Nov 26, 2015, at 11:40 AM, Kevin Sjöberg notifications@github.com wrote:
Hi,
I'm using Formulaic in a project of mine and we use an enum type for selecting a user's role. Since enum values are of type Symbol, Formulaic complains with the following error message:
Formulaic does not know how to fill in a Symbol value
I was wondering if we could solve this in any particular way? Enums should be filled out as select inputs in my opinion. I'd be happy to submit a pull request if we can decide on a solution.
Cheers, Kevin
— Reply to this email directly or view it on GitHub.
@calebthompson I've sent a pull request addressing this issue. You can find at #51.
Closed by #51.
@calebthompson I'm closing this since we've merged #51.
Hi,
I'm using Formulaic in a project of mine and we use an
enum
type for selecting a user's role. Since enum values are of typeSymbol
, Formulaic complains with the following error message:My suggestion would be to convert symbol values to strings by calling
#to_s
on them and then letStringInput
class handle it as usual. What do you think about this? Can this have any side effects that I'm not seeing right now?I'd love to send a pull request as we decide on a solution! :smile:
Cheers, Kevin