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. The plugin is design
|
|||||||||||||||||||
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'.
tags
Download Ruby on Rails SubList Plugin 0.1
Authors software
|
|
|
|
|
|
Similar software
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Other software in this category
|
|
|
|
|
|
|
|
Featured Software
jEdit 4.3 pre8
jEdit is an Open Source text editor written in Java
Opera 9.02
Surf the Internet in a safer, faster, and easier way with Opera browser
GNU Aspell 0.60.4
GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell
- Communications
- Database
- Desktop Environment
- Games
- Internet
- Multimedia
- Office
- Programming
- Science and Engineering
- System
- Text Editing&Processing
