Added file resource support [Rails 4 fixing]