-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
Hi,
I have two models, PaymentRequest, which has many reservations related to it through relation field.
Here is an example of how I'm doing it:
payment_request = PaymentRequest.first
payment_request.reservations
=> [#<Reservation:0x007fc6bb2b84f8>, ...]
payment_request.reservations << Reservation.first
=> #<Reservation:0x007fc6bb223768>
payment_request.reservations.count
=> 2
payment_request.save
=> false
payment_request.errors.messages
=> {:"111"=>["invalid type for key reservations, expected relation<Reservation>, but got array"]}
I'm doing as it's done in the tests from @mattvv fork, am i doing it wrong? There's another way to do it?
Metadata
Metadata
Assignees
Labels
No labels