I have 2 tables. I use table prefix x_.
- User has_many :follows (table x_users)
- Follow (table x_follows)
I want to find out total count after inner join. Following works fine.
User.joins(:follows).where(x_follows: {something: 1}).count
How can I remove x_ from where condition to make this call generic?
Aucun commentaire:
Enregistrer un commentaire