My eldest acted out (horribly) only once in a restaurant. she had been dining out with her Grandmother since she was 2, and was able to order for herself by 3. But those were times when she and Grandma went together and she got LOTS of attention for being so "grown up". . .the acting out happened when she was around 6.
she was horrible, we couldn't get her to settle down, so we took her outside, and that was that. When she calmed down, she could come back inside, and if she didn't, she (and an adult) stayed outside. It was embarrassing, but it never happened again.
I agree with the parents who recommend eating at an active place with your toddler. And when you eat out, be sure your child is getting a ton of attention for GOOD behavior. McDonald's isn't my favorite eating place, but sitting there with a milkshake is kind of nice, cuz means the child can play in the play area while you talk. But even at McD's, we required our kids to eat nicely. If they did that, then they could go play. It's a great reward, while you allow time to practice good public eating manners.