I have an ActiveRecord Appointment model, which includes topic and time attributes. I would like to allow users to be able to modify time. But I want to prevent them from modifying topic after this field is populated.
How should I go about this cleanly in Rails?
Thank you.
If you’re using a shared partial between your new and edit views, you can conditionally output an edit field for the columns in question if
appointment.is_new_record?returns true. Otherwise, just render them as text.