Used in either a situation or to describe an accomplishment that turns out exactly as you'd hoped. Or just as a way of voicing enthusiasm towards a remark made by someone else.
Jim: This party is going off!
Brian: Yeah man, it's an ace in the case!
Tod: Just got the wifi working again.
Roger: Sweet, ace in the case!