---
title: "Discussion on \"How to use tomselect javascript library to create and edit a\"belongs_to :many relation\" with Ruby on Rails\" | Hashnode"
description: "Discussion on \"How to use tomselect javascript library to create and edit a\"belongs_to :many relation\" with Ruby on Rails\". Imagine that you have a classic has_many :through relation where you need to select several records out of thousands. Your form should be using an html select tag which would prove problematic if you had to select, say 5 records, out of 50.000 or mor..."
url: "https://hashnode.com/posts/how-to-use-tomselect-javascript-library-to-create-and-edit-abelongsto-many-relation-with-ruby-on-rails/649b438a7f2fe860fa1c0c08"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to use tomselect javascript library to create and edit a"belongs\_to :many relation" with Ruby on Rails](https://nkokkos.hashnode.dev/how-to-use-tomselect-javascript-library-to-create-and-edit-abelongsto-many-relation-with-ruby-on-rails?utm_source=hashnode&utm_medium=feed)

Imagine that you have a classic has\_many :through relation where you need to select several records out of thousands. Your form should be using an html select tag which would prove problematic if you had to select, say 5 records, out of 50.000 or mor...

Jun 27, 2023 · 4 min read · nkokkos.hashnode.dev  
Updated Mar 1, 2024  
Read the article

-   [#ruby-on-rails](https://hashnode.com/tag/ruby-on-rails)
-   [#stimulus](https://hashnode.com/tag/stimulus)
-   [#ajax](https://hashnode.com/tag/ajax)
-   [#autocomplete](https://hashnode.com/tag/autocomplete)
-   [#tom-selectjs](https://hashnode.com/tag/tom-selectjs)

## Written by

[Nick K.](https://hashnode.com/@nickk)

@nickk · Greece

  
[View profile](https://hashnode.com/@nickk)

Rails Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
