Skip to content

app broken after editing ticket if it had previously uploaded file(s) #3

@eriol12

Description

@eriol12

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!!

action_
reaction_
1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions