compatible with rails3