We are creating SNS sites where users like Twitter can post.
Specifically, the Ruby on Rails Tutorial sample application has just been completed, and we are now trying to add functionality.
I would like to implement a function that automatically deletes data after a certain period of time (30 minutes) after the user posts it.
I tried using whenever and expires_in, but I couldn't erase it because I didn't know how to write it.
In the case of whenever, how should I write it on schedule.rb?
Also, if there is any other way, please let me know.
I apologize for the inconvenience, but I would appreciate it if you could reply.
ruby-on-rails ruby
Rather than automatically deleting data from the database after a certain period of time, wouldn't it be easier to implement it if erb didn't display posts after a certain period of time?
© 2024 OneMinuteCode. All rights reserved.