merge mose/rails4, pull request #31