Hi guys, I need some help here! is there a way to...
# avo-2
v
Hi guys, I need some help here! is there a way to query belongs_to field based on another model id? For example, I have 3 tables, User, User Category, and Company User belongs_to user_category and company UserCategory belongs_to Company and has_many users Company has_many users and user_categories in my case, I would like to show only company user categories in the user form, like In the new user form 1- first select the company 2- select the user_category where company_id is the company_id that I previous selected Ty @lemon-wall-20836 for this amazing job ❤️
l
hey there
could you post a new issue with code (models and associations)?
it's way easier to digest the information with code samples
v
sure!
l
thank you!