You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 14, 2021. It is now read-only.
I had another though for an addition in your library.
I'm sorry that i haven't had found time to fork your repo to make an example but here goes anyhow.
There should be way to validate if any of the possible options where checked.
Not sure how the syntax would be, perhaps something like validates_accepted_any :fieldname ?
And the implementation would be pretty much like @booleans_data.reject { |k, v| k.blank? || !v[1] }.any? So it would filter out any keys that are nil, or which boolean value is in FALSE_VALUES.
Dunno if this makes sense, just something i needed in one project :)
I had another though for an addition in your library.
I'm sorry that i haven't had found time to fork your repo to make an example but here goes anyhow.
There should be way to validate if any of the possible options where checked.
Not sure how the syntax would be, perhaps something like validates_accepted_any :fieldname ?
And the implementation would be pretty much like @booleans_data.reject { |k, v| k.blank? || !v[1] }.any? So it would filter out any keys that are nil, or which boolean value is in FALSE_VALUES.
Dunno if this makes sense, just something i needed in one project :)