hi,
I’m new to Rails (I’m comming from Django) and I’m looking for
something equivalent to Django’s Formsets (http://
Formsets | Django documentation | Django) and Inline
Formsets (Creating forms from models | Django documentation | Django
#using-an-inline-formset-in-a-view)
does Rails have anything like this?
for those who don’t know Django, a formset is an html form that
represents several records at once, like this:
given an Article, a formset with 3 items would be like:
Title: Pub date: Title: Pub date: Title: Pub date: ....(please, ignore the clutter. just the INPUT tags matter)
and when the request is submitted, I just have to do this in my
controller to get it parsed:
ArticleFormSet = formset_factory(ArticleForm)
if request.method == ‘POST’:
formset = ArticleFormSet(request.POST)
(now, the formset object has a list of 3 Article objects)
thanks in advance,
Cesar