updated rails helper