“You did the right thing by telling me.”
You found that your tablet computer was broken when you came home. Your son admitted that he dropped it. You're angry, but you want to encourage him for telling you the truth.
You did the right thing by telling me.
When someone does "the right thing", it means that they do what is honest or morally right. For example, you can tell someone that they "did the right thing" in situations like:
- a student reports some dangerous behavior by another student to their teacher
- someone found a missing wallet and returned it to the owner
This is different from telling someone that they were "right", which means "correct":
You were right. It's scheduled for Monday, not Tuesday.
To mention which action was "the right thing", you can say "by ___ing":
You did the right thing by coming to me.