https://github.com/kishan-aghera/cocoon-gem-example
Demonstrates the use of cocoon gem for unobtrusive nested forms handling in Ruby on Rails.
https://github.com/kishan-aghera/cocoon-gem-example
cocoon-gem jquery nested-forms rails ruby
Last synced: 29 days ago
JSON representation
Demonstrates the use of cocoon gem for unobtrusive nested forms handling in Ruby on Rails.
- Host: GitHub
- URL: https://github.com/kishan-aghera/cocoon-gem-example
- Owner: kishan-aghera
- Created: 2021-04-27T12:00:17.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-14T12:18:12.000Z (almost 5 years ago)
- Last Synced: 2025-03-11T12:39:08.919Z (about 1 year ago)
- Topics: cocoon-gem, jquery, nested-forms, rails, ruby
- Language: Ruby
- Homepage:
- Size: 188 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
```bash
# 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.
```bash
# 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.
```bash
$ rails s
```
#### You can check the blog for the cocoon gem [here](https://www.bacancytechnology.com/blog/cocoon-gem-example-in-rails-6#).