fallback for active_record 3.2