The code can be seen on the working branch at: https://github.com/eriol12/ticketee_review.git
If you try to edit a ticket that had file(s) attached when it was created or from a previous edit app will break. Look at the following error! The edit form is setting new rows (equal to the number of files previously uploaded) in the assets table with asset attribute & content_type to [null]! It shouldn't do that! Is duplicating rows with asset & content_type to null! It should be keeping (not replacing) files on nested edits. There ought to be an "if new_record? do this else do that" somewhere in the form view! As well the file number count it ain't right in the edit form when adding more files on top of previously attached files!! Plus when editing the <%= asset.label :asset, "File ##{number += 1}" %> line doesn't work properly!!


