Skip to content

Remove product (just use deleted_at) #52

mitfik opened this Issue Aug 24, 2012 · 4 comments

3 participants

mitfik commented Aug 24, 2012


Could you help me understand how to remove product from ror-e?
I see that is just question of set up flag for it but I do not see any functionality for that in UI (I use the new one from @deanperry )
But as I remember either in the old one this feature was missing.

To make question clear:

Right now in product.rb model we have active flag and deleted_at of course differences between those two are quite obvious (active means that is at store but is not visible on user side, deleted_at means that product was removed from our inventory)

but in method destroy instead of setup deleted_at is just active = false which confuse a little bit. Shouldn't be there deleted_at ?
And one more question: because right now delete means: setup flag and hide product, is there possibility to remove it from database or this can be done only from console?


I'll add an option in the new admin to remove a product.

@deanpcmad deanpcmad was assigned Sep 8, 2012

deleted_at and active are actually the same thing.. I use the active flag but left deleted_at because many stores will want to change the logic. It might be best to remove the active flag and use deleted_at. hmmmm

I like deleted_at more but the query time is more costly.

drhenner commented Jan 2, 2013

Actual removal from the DB would kill the DB. and order with that product would have issues. I will change the model to use deleted_at and then close the issue

drhenner commented Jan 3, 2013

OK now it just uses deleted_at... This should be less confusing now.

@drhenner drhenner closed this Jan 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.