gem 'trailblazer', '2.1.0' gem 'trailblazer-rails', '2.1.7' gem 'trailblazer-operation', '0.6.0' gem 'reform', '2.3.0.rc2' gem 'reform-rails', '0.2.0.rc3' gem 'dry-validation', '1.3.1' gem 'dry-monads', '1.3.1'
@apotonick regarding nesting: I have a model (Person) with a nested model (Profile) inside using embeds_one. I have an API built for Person (person) and an api built for Profile (person/:person_id/profile). I have a contract for both person and profile with validations on each. When I do a new post request with a Person and include a profile in it the validations for person run but the validations for profile don't. So even though profile has a bunch of fields in it that are required in the contract, it successfully builds the object even though profile and its required fields don't exist in the post request.
So basically I'm having an issue with nested validation on contracts. Any help would be appreciated. Also you can include that in the docs 👍
CollectPaymentOperation (charging a credit card), which is nested inside a
CompletePurchaseOperation. My current implementation with
payment_result.success?feels clunky, and I'm sure there's a better way to proceed.
trailblazer-workflowbut I'll try to answer your question in the coming Nesting tutorial