3

enter image description here

My issue I am having is, i want to include all these models when I query my object and return it via my API, but the only issue, is I want to only include on_the_ways where the user_id is not equal to nil. If the user_id is equal to nil, i do not want to include these models

Thanks in advance!

Travis Delly
  • 1,194
  • 2
  • 11
  • 20
  • It would be very convenient if you use [Active Model Serializers](https://github.com/rails-api/active_model_serializers). – 31piy Mar 03 '17 at 06:30

0 Answers0