made compatible with rails 3.0 for now