Change type_cast_code to type_cast due to method deprecation in Rails4

See https://github.com/rails/rails/commit/f50c160cd028bd3e16c46dcba7692439daf709c8
Merge pull request #1 from rochers/master

Fix deprecation warning for type_cast_code