The Rails JSON encoder API requires `as_json` to take an optional arg
Merge pull request #1707 from chancancode/as_json_fix

The Rails JSON encoder API requires `as_json` to take an optional arg