Ruby -v 2.2.2
Rails -v 4.2.0
Simple example app on how to use has_many, :through associations and how to create checkboxes on view to select itens you want.
git clone git@github.com:anchietajunior/MANYTOMANY.git
cd MANYTOMANY
bundle install
rake db:create
rake db:migrate
rails server