E
E
eldar_web2016-03-25 15:42:33
Ruby on Rails
eldar_web, 2016-03-25 15:42:33

How to give the opportunity not to delete anything in a Ruby on Rails project?

The task is to ensure that the site does not give the opportunity not to delete anything from the database, but to cleanly mark it as deleted.
How can this problem be solved in a simple way?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
badcluster, 2016-03-25
@eldar_web

Mark entry as :deleted => true. And then use scope :active, -> { where(deleted: false) }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question