I have a Rails 7.1.3 app that has ActiveStorage and Ransack installed. I have a model called Import
that has_one_attached :file
. I would like to search by filename, using Ransack, in the imports/index
view. I have tried the answers here and the suggestion here, but neither are working. I have also tried to create lib/active_storage/attachment.rb
and add the rasackable_attribites
, but still no luck. I feel like I’m getting pretty close, but still end up with either a type error, or a missing association error. Anyone have any idea how to get this to work?