How to filter result dainamically in ruby on rails

I am a newbie in ruby on rails it's also my first ruby application.
I want to filter results by clicking on checkbox which is coming from
the database and showing on the right side of my webpage, the checkbox
is lying on the left side. In the below I attached my webpage's
screenshot for easy understanding. Anyone can help me, please, how can I
solve this issue.


Add some scopes to your model

The in the controller apply the scope if the parameters for the checkbox is present.

Not knowing your field names and form field names


scope :education, ->(degree) {where(education: degree)}


@resumes = Resume.all

@resumes =[:degree]) if params[:degree].present? #not really correct if you are using checkboxes I bet, but should give you an idea of where to start.