respond_with returns unknown format - rails

前端 未结 1 608
一生所求
一生所求 2021-01-18 09:59

I am using through AngularJS to send some json, in the controller I have

respond_to :json

def create
    respond_with Task.create(description:         


        
相关标签:
1条回答
  • 2021-01-18 10:17

    You want your default format to be "json", not "js".

    Rails has a list of formats that it is expecting (based on defaults plus you or gems can add additional known response types.) Js is not one of the defaults

    0 讨论(0)
提交回复
热议问题