Section 12. Upon an action for divorce by either spouse for a cause accruing after marriage, the real and personal property of the other spouse may be attached to secure suitable support and maintenance to the plaintiff and to such children as may be committed to his care and custody.