Fixed Rails 4 Controller Scaffold Generator.

Rails 4 scaffold will now generate controller code that supports JSON responses. Based heavily off of the controller scaffold override in jbuilder.