I have a User
model that has a
has_rich_text :tlk_with_me
rich text blob attached.
On one of my pages I want to load all the users with a tlk_with_me
blob, and none of the other users.
I have tried the solution in this answer:
How to query records that have an ActiveStorage attachment?
Which suggests doing the following query:
@users_with_twm_attached = User.joins(:tlk_with_me_attachment)
However I get the following error:
ActiveRecord::ConfigurationError (Can't join 'User' to association named 'tlk_with_me_attachment'; perhaps you misspelled it?)
I am unsure how to proceed. Thank you