mr_video icon indicating copy to clipboard operation
mr_video copied to clipboard

Deleting the last episode of a cassette results in error on cassettes index view

Open thutterer opened this issue 5 years ago • 0 comments

When I delete all episodes of a cassette and then go back to the cassettes index view, it tries to display time_ago_in_words(cassette.updated_at) but raises an NoMethodError in MrVideo::Cassettes#index since updated_at is nil at this point.

Would be rather easy to prevent (based on episodes.any? or similar) but I was thinking if we might want to delete the whole cassette when it's empty.

@quidproquo Thoughts? :)

thutterer avatar Dec 12 '19 11:12 thutterer