update generator file according to rails 3