I made a prototype of an Uber-like app and I have a few questions regarding Model validations
and the factories I’ve made to test them.
It’s still very basic. I’m saying it’s Uber like because that’s what I want it to eventually be.
So, the specific questions are regarding the validations inside trip.rb and the factory for it which is trips.rb.
I don’t get why the validations are not working.
When I try to validate presence of the associated driver. It doesn’t work and I get an error in the user_role? method
There is another issue (I think) with the factory in trips.rb becuase everytime I run on the presence validations
It just seems to ignore it and goes into the function which would fail without a driver present.
Let me know if you need further clarification on my questions