I'm not 100% sure but you might not have to do this with a before filter try this in the config block at the top of your controller
config.create.columns[:column_name].form_ui = ui_for_create config.update.columns[:column_name].form_ui = ui_for_update ~Kenny On Tue, Jul 7, 2009 at 12:34 PM, David Cato <[email protected]> wrote: > > Rio wrote ... > > > I'd like to be able to configure form_ui differently for create vs. > > update actions. I know the following won't work, but was wondering if > > anyone had any suggestions? > > > > config.create.columns[:column_name].form_ui = :ui > > Put it in a before filter. For example, > > class XyzController < ApplicationController > before_filter :update_config > ... > def update_config > if params[:action] == 'new' > # Settings for new/create > active_scaffold_config.create.columns[:column_name].form_ui = > ui_for_create > else > # Settings for edit/update > active_scaffold_config.create.columns[:column_name].form_ui = > ui_for_update > end > 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 -~----------~----~----~----~------~----~------~--~---
