timriley on rich-component-dirs-config
Add component_dirs setting Rem… Scan component file for magic c… Make load_component easier to u… (compare)
timriley on rich-component-dirs-config
Fix wording Add Rubocop rule Clarify names Fixup naming and 4 more (compare)
flash-gordon on master
Add more predicates to mapping (compare)
timriley on rich-component-dirs-config
Use base Dry::Container missing… (compare)
timriley on rich-component-dirs-config
Make load_component easier to u… (compare)
dry-bot on master
[devtools] sync (compare)
flash-gordon on master
Make predicate inference truly … Update changelog.yml (compare)
flash-gordon on custom-builder-methods
Support for custom builder meth… (compare)
flash-gordon on or_nil-extension
Add Type#or_nil via builders ex… (compare)
dry-bot on master
[devtools] sync (compare)
flash-gordon on master
Fix changelog (compare)
dry-bot on master
[devtools] sync (compare)
module MyModel::Types
include Types.module # this is in /app/types/app.rb
...
AnswerOutcome = Types::Strict::String.enum('expired', 'verified', 'unverifiable', 'flag')
end
Dry::Types.register_class(Question)
module Types
include Dry::Types.module
end
Types::AnswerOutcome
, where it should say MyModel::Types::AnswerOutcome
{total: 123, items: [{amount: 22}, {amount: 193}]}
What complicates this is that I was thinking of defining the validation on items
, but that means that if there are validation issues with some of the other content in the items hashes that the errors returned may sometimes be an array of error strings, other times an array of error hashes