Closed Bilal-Abbas closed 4 years ago
not very detailed, unfortunately, but i think this is due to how you named your search scope
I have solved my problem. This problem was due to not using the search correctly in many to many associations using through I have fixed it. In my organization modal, I have
has_many :subscribers, through: :organization_subscriptions, source: :user
and my organization_subscriptions modal has
belongs_to :user belongs_to :organization
I simply add the following and it worked in the console as well as in the development
search_scope :search do attributes user: ["user.user_id"] end
DEPRECATION WARNING: #search is deprecated and will be removed in 2.3, please use #ransack instead (called from pry at (pry):21)