Jump to content

The ultimate community for Ruby on Rails developers.


Photo

Select 2 gem full example

select2 autocomplete serach

  • Please log in to reply
2 replies to this topic

#1 ahnbizcad

ahnbizcad

    Passenger

  • Members
  • 7 posts

Posted 06 July 2014 - 11:22 PM

I've been strugglign with select2 gem, and getting it to work. I was wondering if anyone knew of a resource showing a full example of it working, including the controller / back-end side, not just the API.

Guides most frequently use has_many relationship as their example, but has_many :through also need examples. I understand you need to build objects if you're using forms, so an example of that integrated with select2 would be great.

Thanks in advance.



#2 Jamie

Jamie

    Controller

  • Moderators
  • 140 posts
  • LocationNewcastle, UK

Posted 21 July 2014 - 07:06 PM

I've been strugglign with select2 gem, and getting it to work. I was wondering if anyone knew of a resource showing a full example of it working, including the controller / back-end side, not just the API.

Guides most frequently use has_many relationship as their example, but has_many :through also need examples. I understand you need to build objects if you're using forms, so an example of that integrated with select2 would be great.

Thanks in advance.

 

An example I discovered recently is by our very own Adam Cooke.

 

You'll be able to see the select2 gem in action via this repo.

 

Hope this helps.

 

 

:)


  • ahnbizcad likes this

Rails developer based in Newcastle, UK.


#3 ahnbizcad

ahnbizcad

    Passenger

  • Members
  • 7 posts

Posted 09 August 2014 - 01:23 AM

Awesome, thanks man!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users