Converted to use Rails4