Use protected attributes for rails 4 compatibility.