Closed
Description
Hi,
I'm having trouble using the Boolean type with proper boolean values.
What I initially wanted to do:
optional :active, type: Boolean, default: true
Always returns active is invalid
should I send { "active": true }
or { "active": false }
What i had to do is actually add coerce_with
using the identity lambda...
optional :active, type: Boolean, default: true, coerce_with: ->(v) { v }
Did I miss something here ?
I'm using version 0.18