quydox

Joined

50 Experience
0 Lessons Completed
0 Questions Solved

Activity

Hello everybody,

I have a model: account.rb, with has_many condition like this

has_many :purchases, -> { where(available: true, workspace_id: nil).order(id: :desc) }

Now I want to pass workspace_id params to has_many

How can I do it? I do research on GG but got nothing

Thanks,

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.