fixed rails 4.0 deprecation warnings, added rails 4.0 tests