The prison confrontation seemed like it happened just because the writers wanted them to leave the prison, not because it made any sense. I felt like it was a Walter White situation - seemingly impossible to get out of, but Rick should have been able to using some quick thinking. He explained how it would be pointless to attack and I think realistically the attackers should have agreed with his thinking. He just should have emphasized how the prison would be completely useless the second the tank took down the fence, so all they would be left with if they won was half their people dead and they would have killed innocent people, maybe including children.
The attackers would then have to return to their camp with nothing to show for their losses since the prison would be overrun with zombies.
I can see how Rick stating the obvious (which he did), and everyone agreeing meaning they call off the attack on the prison would have made for a much more exciting episode
