Have you ever done rails development before? Sent from my Verizon Wireless BlackBerry
-----Original Message----- From: JannaB <[email protected]> Date: Wed, 6 May 2009 12:52:46 To: ActiveScaffold : Ruby on Rails plugin<[email protected]> Subject: Re: Change behavior of "Delete" Yes, you are very right -- I dont just want to get rid of the link to delete -- in fact, I WANT the link to show, but function differently. So, if in my model, I put: def destroy @deleted=-1 end The value for deleted (an integer) for that row, does not get written to the table. What am I missing here? Thanks so much! -Janna On May 6, 9:31 am, naaano <[email protected]> wrote: > ...or in the model, since he said that nothing get's deleted, he > should override destroy in each model, in order to ensure that nothing > get's deleted. > > Or even better, i would make a module with this implementation, and > then extend it in each model. > > On May 5, 6:15 pm, Kenny Ortmann <[email protected]> wrote: > > > All that this does is exclude the delete function. > > > If you want to change the functionality of the delete all you have to do is > > override the destroy method in your controller. > > > On Tue, May 5, 2009 at 3:12 PM, JannaB <[email protected]> wrote: > > > > Answering my own q here in case someone searches on these issues here > > > in the future (this is really easier than I thought): In my > > > controller: > > > > active_scaffold :<my model> do |config| > > > config.actions.exclude :delete > > > config.actions.swap :search, :live_search > > > 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 -~----------~----~----~----~------~----~------~--~---
