On Lunes, 17 de Enero de 2011 08:50:33 vhochstein escribió:
> Hi,
> 
> one option would be to say that active_scaffold_session_storage is a
> helper_method in your controller.

Although I would use active_scaffold_constraints method instead of 
active_scaffold_session_storage

> 
> --
> Volker
> 
> On Jan 13, 6:08 pm, thoen <[email protected]> wrote:
> > I use embed an AS table for Messages in several other views (classes,
> > grades, etc). I have a field that needs to display as a select tag in
> > most of the embeds but as a hidden field in some of them. I tried the
> > following,
> > 
> >   def send_to_form_column(record, name)
> >    if active_scaffold_session_storage[:constraints] and
> > active_scaffold_session_storage[:constraints][:group_type] and
> >       (active_scaffold_session_storage[:constraints][:group_type] ==
> > 'School' or active_scaffold_session_storage[:constraints][:group_type]
> > == 'Grade' or
> >         active_scaffold_session_storage[:constraints][:group_type] ==
> > 'Classroom')
> >         select_tag(name, options_for_select(["All", "Only Parents"],
> > record.send_to))
> >     else
> >       hidden_field_tag(name, "All")
> >     end
> >   end
> > 
> > but I get an 'undefined local variable or method, not surprisingly, on
> > active_scaffold_session_storage. Is there a way to access this
> > information from within a form override helper method?
> > 
> > Best,
> > Tom

-- 
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.

Reply via email to