I want to have two destroy methods for my model.

First method must be a "classic" destroy method — find a record and
destroy it. "Delete Forever" link in the view.
Second method must find a record and mark it as deleted (or as moved
to trash). "Move to Trash" link in the view.

How can I do this? Should I just use model.destroy for the first case
and write custom method for the second? In this case how can I make a
"Move to Trash" link for the second method in the view inaccessible
for spiders?

Or can I pass an argument for destroy method from view and depending
on that argument do a "classic" destroy or just mark the record as
deleted?

Or even something else?
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to