Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Remove product (just use deleted_at) #52

Closed
mitfik opened this Issue · 4 comments

3 participants

@mitfik
Collaborator

Hi

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?

@deanperry

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

@deanperry deanperry was assigned
@drhenner
Owner

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
Owner

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
Owner

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

@drhenner drhenner closed this
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.