Update Active Record statements

Just to make Active Record stop complaining about deprecated statements