FIX: work with rails 3