Hi, I would recommend instead of overriding create... just do the following in your controller:
def after_create_save(record) flash[:info] = 'Good job' end -- Volker On 19 Jan., 10:28, rvhi <[email protected]> wrote: > Hi, > > I want the 'create' method to show the result in a flash. So I define > this in the controller. > > def create > super > flash[:info] = (successful? ? 'Good job' : 'crap') > end > > However it doesn't show any flash. If I move the flash[:info] before > super, it always shows flash even if there is a validation error. I > only want to show the flash if it is successfully inserted. > > Any suggestion? > > Thanks,
-- 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.
