I’m trying to modify an existing Ruby on Rails project. I understand that forms and models are closely related. I’m trying to understand how to modify a form so that instead of accepting an upload, it stores a timestamp instead. So, my understanding is that I need to modify the view and the model. Is there anything else I need to modify? What happens to existing data that I have stored in ActiveRecord?
Share
Unless you remove columns from the table with a new migration – data will be safe. It’s a good practice to write tests, so when such situations occur that you need to modify something – you can test that everything still works.
Btw, I don’t understand the logic that you are trying to implement. The form was uploading some file before, and you need to change that and remove the file upload and modify some timestamp in the record?