Thanks - just figured this out here ourselved. The "@record" thing was what we were unaware of.
On 16 Mrz., 22:53, Swartz <[email protected]> wrote: > You can still use @record variable. > > It would be something like this: > > def options_for_association_conditions(association) > if association.name == :problemstatus > # > if @record.status == 'New' > ['problemstatuses.name != ?', 'Analyzed'] > else > # display all statuses or nest if-statements if you have to > end > else > super > end > end > > > Here's the problem in code (in the helper): > > > def options_for_association_conditions(association) > > if association.name == :problemstatus > > # > > # How do I access the problem itself here ? > > # There is only access to the association. > > # > > else > > super > > end > > end -- 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.
