kishan-aghera / cocoon-gem-example

Demonstrates the use of cocoon gem for unobtrusive nested forms handling in Ruby on Rails.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cocoon Gem Example

Demonstrates the use of cocoon gem for unobtrusive nested forms handling.

Description

The project have been implemented to demonstrate how we can use cocoon gem to make nested forms in ruby on rails framework. The gem uses jQuery to make handling unobtrusive.

Install

To setup project locally, follow below instructions.

Project Configuration

Have ruby version ruby-2.7.2 installed as mentioned in Gemfile.

Install necessary dependencies.

# install dependencies mentioned in Gemfile
$ bundle install

# verification of already installed files in node_modules
$ yarn install --check-files

Database Setup

Create and Initialize database.

# migration of database
$ rails db:migrate

Starting the server

To start the server on localhost run the command below. The server will start on default port 3000.

$ rails s

You can check the blog for the cocoon gem here.

About

Demonstrates the use of cocoon gem for unobtrusive nested forms handling in Ruby on Rails.


Languages

Language:Ruby 76.6%Language:HTML 14.2%Language:JavaScript 7.4%Language:CSS 1.4%Language:SCSS 0.4%