fix multisite to work with rails 4