RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Double Nested Association Setup With Formtastic and Cocoon in Rails

Setting Up a Has Many / Has One Nested Association With Formtastic and Cocoon in Rails 4.2

I recently had to setup a double nested association in Rails with the formtastic and cocoon gems. The model setup: a Person has_many Talks, and a Talk has one Location. I wanted to be able to add (or delete) a Talk with its corresponding Location. Here’s how I did it.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in