use active record ~>4.0