Well, it is nice you gave her the right medicine to her actions.
Taking credits when things she was advised fir works out and shading the person when it does not shows how hypocritical she is.
However, giving her advice doesn't mean she is meant to just take it. She's supposed to weigh it and think deeply if it is truly applicable before venturing into it.
So, the way you turned the table around her serves her right.