include middleware for rails4