the active_scaffold plugin for rails can be useful at times. as is typical of a large library, when it doesn’t do quite what you want, you have to start overriding parts of it.
unfortunately, there aren’t a lot of documented options to doing this with active_scaffold—at least not in the published docs. the code comments discuss more available options. so, what follows is an attempt to document some of those options.
i have used some of these, but not all of them. i don’t promise they work as advertised or even at all.
these are helper methods that can be created for a specific controller.
when to define: to do custom rendering of the form widget for a particular column
when to define: to do custom rendering of the record value
when to override: if you want to substitute a different default sanitization method for all columns. default is h(value).
when to override: if the ActiveScaffold is used as a component on another controllers page
when to override: define additional conditions to be used when querying a recordset
when to override: to extend creation of @record in the new method, perhaps to add default values
when to override: when a hook is needed into the create method
when to override: when customizing handling of authorization for new/create methods
when to override: to customize the process of actually destroying a record
when to override: when customizing handling of authorization for delete/destroy methods
when to override: when customizing handling of authorization for the show_search method
when to override: when customizing handling of authorization for index/table/update_table/row/list methods
when to override: when customizing handling of authorization for the show_search method
when to override: to customize how the parent/source record is found when nesting
when to override: when customizing handling of authorization for the show_search method
when to override: change the default finding of @record for show
when to override: when customizing handling of authorization for the show method
when to override: change the default finding of @record for edit
when to override: if you need to inject data into the record before the update is saved
when to override: when customizing handling of authorization for edit/update methods
when to override: to extend or customize the logic for determining class names of other ActiveScaffold controllers to facilitate nested controllers build on AR relationships
when to define: to indicate what associations should not be followed by active scaffold’s update mechanism
when to define: to indicate what associations should be followed only by active scaffold’s update mechanism
notes: each column that is rendered by the default AS widget helpers is given one or more special classes: