Ruby on Rails SubList Plugin 0.1

Ruby on Rails SubList Plugin makes it easy to have dynamic lists of related models on a single editing page.
Ruby on Rails SubList Plugin makes it easy to have dynamic lists of related models on a single editing page.

The plugin is designed for models with one or more has_many relationship with other models.

By using AJAX for adding and removing "sub-forms" one can present the user with a single edit page that creates/edits the parent model as well as all of the children.

Usage:

Place the sub_list directory in the vendor/plugins dir of your application.

In the controller which you wish to have a sub list displayed, add the following lines:

include UIEnhancements::SubList
helper :SubList

sub_list 'SubModel', 'parent' do |new_research_student|
#Place any construction (ie. defaults) required here
end

Replace 'SubModel' with the class name of the sub model you wish to make available.

Replace 'parent' with the parent object.

For instance, if you wish to have a Person controller that has a sub list of Dogs for each person, the sub model would be 'Dog' and the parent would be 'person'. It is expected that @person would exist and that it contains a has_many relationship named 'dogs'.

last updated on:
July 7th, 2006, 17:54 GMT
price:
FREE!
homepage:
rorsublist.rubyforge.org
license type:
GPL (GNU General Public License) 
developed by:
Luke Galea
category:
ROOT \ Database \ Administrative frontents
Ruby on Rails SubList Plugin
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!

Add your review!

SUBMIT