Replaced remove method for older versions of Rails