make rails 3 compatible

@eac