Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Database Issues

Larry Cousino
Larry Cousino
23,127 Points

Instead of destroying a record. If a user were to click destroy, can the record just be made inactive?

Maybe active could be an attribute, set to true or false. This would allow an admin to easily recover the inactive record.

2 Answers

Wouldn't that simply make it a PUT request where you change an 'status' column from 1 to 0 instead?

Larry Cousino
Larry Cousino
23,127 Points

For sure you're on the right track and may be correct, but I'm not certain. Years ago, I did something like this is a visual basic program, that was connected to a SQL server. When employees left, the users would delete them; however, on the backend I could undelete them, making them visible again. Thanks Fernando.