Skip to main content
Context: In this case, a card has many expense categories through a many to many relationships, using a join table (card expense categories). We want to be able to create a card, selecting the categories, and creating the card expense categories at the same time. Implementation: We will use a smart action form with a hook to retrieve the categories as values for the multi select. Then we implement the creation of cards and expenseCategories in the form. forest/cards.js
routes/cards.js

Rails version:

lib/forest_liana/collections/card.rb
config/routes.rb
controllers/forest/cards_controller.rb