Rails: Howto get the controller generator add format.json call to all action respond_to blocks?
Could someone please remind how I get the generator to add the lines required to use JSON in my controllers? Having to type format.json { render :json => @story } type lines to each action is starting to ge开发者_运维知识库t old?
You would need to patch rails generator templates to handle this. I know of no way to specify it
精彩评论