On Miércoles, 7 de Abril de 2010 00:49:59 scrozier escribió:
> I've got the following ActiveRecord relationships established:
>
> Institutions has_and_belongs_to_many Diplomas, and
> Diplomas has_and_belongs_to_many Institutions
>
> (And have the appropriate diplomas_institutions table in the db.)
>
> On a page displaying one Institution, I have an AS form for Diplomas,
> rendered as a component. It gets the constraint, :constraints =>
> { :institutions => @institution.id }.Please put the code you are used in that page to dispay institution and AS form. > > How would you do the AS config in the Diplomas controller so that when > this component was rendered, one could see a list of Diplomas > associated with the Institution, and 1) associate an existing Diploma > record with the Institution, 2) create a new Diploma record and > associate it with the Institution, and 3) remove an association of a > Diploma with an Institution? You get all of these in default AS edit form for an institution > > I won't burden you with the gatrillion ways I've tried this, but > suffice it to say that I've tried most every possible combination > except the correct one, naturally. > > Help for a newbie? > > Many thanks, > > Steve -- Sergio Cambra .:: entreCables S.L. ::. Mariana Pineda 23, 50.018 Zaragoza T) 902 021 404 F) 976 52 98 07 E) [email protected] -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/activescaffold?hl=en.
