Regeneration using rails 3