Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Dynamic fields_for collection support for Rails

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 dynested.gemspec
README.rdoc

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 => 'git@github.com: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

Something went wrong with that request. Please try again.