Updated rails helper