Skip to content

stevecj/dynested

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynested

This is a Rails extension to support dynamic, browser-side collections that work with accepts_nested_attributes_for in Rails models.

Initially, this is intended to be compatible with Rails 3.0.x and newer, using jQuery. Support for Rails 2.x and/or Prototype might or might not be added later.

To use this in your Rails 3 project (must be using jQuery), first add the following to your Gemfile…

gem 'dynested', :git => '[email protected]:stevecj/dynested.git'

… and then execute…

rails generate dynested:javascript

Finally, you need to load the dynested Javascript file in your relevant layout file(s)…

<%= javascript_include_tag :defaults, 'dynested' %>

This is a brand new project, and is still pretty rough around the edges. The only documentation so far amounts to the comments in the /lib/dynested/form_builder_helpers.rb file, the tests in /spec/integration/dynested_spec.rb, and the usage examples in the Rails application in /spec/dummy. Specifically, under /spec/dummy/app/views, see layouts/application.html.erb and albums/_form.html.erb.

Copyright © 2011 Steve Jorgensen, released under the MIT license

About

Dynamic fields_for collection support for Rails

Resources

License

Stars

Watchers

Forks

Packages

No packages published