It looks like the delete statement for models is hardcoded. In my current project, direct delete permissions are denied on all tables. So any deleting of data needs to be performed through stored procedures. Freeze is called at the end of the destroy method, so that means it can''t be overriden, correct? How can I override this with my own code? Thanks, Steve
David Heinemeier Hansson
2005-May-17 00:41 UTC
Re: Calling stored procedure for delete/destroy.
> It looks like the delete statement for models is hardcoded. In my > current > project, direct delete permissions are denied on all tables. So any > deleting > of data needs to be performed through stored procedures. Freeze is > called at > the end of the destroy method, so that means it can''t be overriden, > correct? > How can I override this with my own code?You can indeed just overwrite the destroy method and call freeze yourself when you''re done. Freeze is mostly just there as a reminder, so you don''t even _need_ to call it. -- David Heinemeier Hansson http://www.loudthinking.com -- Broadcasting Brain http://www.basecamphq.com -- Online project management http://www.backpackit.com -- Personal information manager http://www.rubyonrails.com -- Web-application framework