Code Editor
Web Browser
Associations I


Congratulations! You built an travel app that uses a database to store two kinds of data. What can we generalize so far?

  • We connected a Tag to its Destinations using associations. In this case, a tag has_many destinations, and a destination belongs_to one tag.
  • The has_many / belongs_to pair can be used to model other one-to-many relationships, which occur frequently.
  • Rails provides seven standard controller actions can be used to do common things such as display and change data
Report a Bug
If you see a bug or any other issue with this page, please report it here.