Add some scopes to your model http://guides.rubyonrails.org/active_record_querying.html#scopes <http://guides.rubyonrails.org/active_record_querying.html#scopes>
http://api.rubyonrails.org/classes/ActiveRecord/Scoping/Named/ClassMethods.html <http://api.rubyonrails.org/classes/ActiveRecord/Scoping/Named/ClassMethods.html> The in the controller apply the scope if the parameters for the checkbox is present. Not knowing your field names and form field names model scope :education, ->(degree) {where(education: degree)} controller @resumes = Resume.all @resumes = @resumes.education(params[: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. > On Jan 29, 2016, at 9:46 AM, Mukto Mona <[email protected]> wrote: > > 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. > > Attachments: > http://www.ruby-forum.com/attachment/11247/FireShot_Pro_Screen_Capture__008_-__Total_Resumes_I_Hire_Bangladeshi__-_localhost_3000_resumes.png > > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/ac3900089c0b0bb48cb3a6734a44064d%40ruby-forum.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/631C8E34-6671-45FA-9143-D8416EFAB2DD%40btrtrucks.com. For more options, visit https://groups.google.com/d/optout.

