El Sunday 10 May 2009 13:39:03 JannaB escribió: > I found the following link very helpful in getting a better handle on > AS: > > http://www.ibm.com/developerworks/linux/library/l-activescaffold/ > > On another point, in the wiki docs, for Form Overrides, an example is > shown for a checkbox as well as a date select (code from the wiki is > duplicated below). Can anyone show the syntax necessary for other GUI > controls like radio buttons, listboxes, comboboxes, etc? This would be > most helpeful. -Janna
Syntax for controls is a rails issue solved in many tutorials. Really the examples are to use those rails methods with ActiveScaffold. You can look at rails api (api.rubyonrails.org). You have many examples there too. > > module UserHelper > # display the "is_admin" field as a checkbox instead of a dropdown > def is_admin_form_column(record, input_name) > check_box :record, :is_admin, :name => input_name > end > > def date_received_form_column(record, input_name) > # with date_select we can use :name > date_select :record, :date_received, :name => input_name > # but if we used select_date we would have to use :prefix > #select_date record[:date_received], :prefix => input_name > end > end > -- Sergio Cambra .:: entreCables S.L. ::. Nicolás Guillén 6, locales 2 y 3. 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 -~----------~----~----~----~------~----~------~--~---
