How to use tomselect to create and edit a "belongs_to :many relation" with Ruby on Rails - DEV Community

Imagine that you have a has_many xxx :through relation where you need to select several records out of thousands. Selection should be using an html select tag which would prove problematic if you had to select say 5 records out of 50.000 or moreWe are going to build on this great example https://coolrequest.dev/2021/11/25/replace_select2.html where the author uses rails 7, tomselect, stimulus to fetch the data with ajax and autocomplete.
How to use tomselect to create and edit a "belongs_to :many relation" with Ruby on Rails - DEV Community #ruby #rubydeveloper #rubyonrails #dev https://rubyonrails.ba/single/how-to-use-tomselect-to-create-and-edit-a-belongs_to-many-relation-with-ruby-on-rails-dev-community

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles