Coder Social home page Coder Social logo

justin808 / cocoon_simple_form_demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nathanvda/cocoon_simple_form_demo

0.0 2.0 0.0 292 KB

a small Rails application demonstrating nested forms with cocoon and simple_form

Ruby 75.74% JavaScript 4.39% CSS 5.31% HTML 14.56%

cocoon_simple_form_demo's Introduction

cocoon_simple_form_demo

cocoon is a Rails3 gem to allow easier handling of nested forms.

This is a small demo that shows cocoon in action together with slim and simple_form.

Cocoon itself is formbuilder-agnostic, so it works with standard Rails form-builder, Formtastic or simple_form.

Notes

Formtastic is easier to start with, because it has a default css.

In this project I aimed to show that 1) simple_form works, and 2) its customisability, which allows it to be used perfectly together with twitter-bootstrap. While the layout is far from ideal, it is merely intended as a show-case, and the main purpose was to show that it is functioning.

Demonstrated relations

In this project my main intention was to demonstrate how one could solve nested forms, using cocoon for different types of relations. The demonstrated relations in this project are:

  • a project :has_many tasks
  • a task :has_many sub-tasks (double nested relation)
  • a project has an owner (:belongs_to). Where the owner is either selected from a list, or created.
  • a project :has_many tags :through project-tags. Either you select an existing tag, or create and link to a new one. When unlinking from a tag, the tag is not deleted, only the link.

Copyright

Copyright (c) 2011 Nathan Van der Auwera. See LICENSE for details.

cocoon_simple_form_demo's People

Contributors

gsmendoza avatar nathanphilliber avatar nathanvda avatar zpvip avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.