Roland Swingler
2007-Apr-04 12:58 UTC
acts_as_versioned with acts_as_paranoid not creating new versions on destroy
Hi, A quick question, when using acts_as_paranoid with acts_as_versioned, destroying the model (i.e. updating the deleted_at field) doesn''t create a new version. Are there any workarounds for this - I presume it is because aav overrides the update* methods but not the destroy method? In addition, and more confusingly, using the before_destroy callback like so: def before_destroy update_attributes(:some_field => ''some value'') end doesn''t create a new version, even though an update is being done. If you do an update_attributes in the controller then it does create a new version, as expected. This confuses me slightly - why would *where* you are calling the update_attributes method from make a difference? Any help with this appreciated, TIA, Roland --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---