Updated to latest rails 40 series, fixes #13