为什么我的 API 饼图参数没有显示?
Why are my API Pie parameters not showing up?
我为我的方法创建了文档,顶级方法描述与其动词一起显示,但是当我单击这些链接中的任何一个时,它会告诉我 "Oops!! Method create.en
not found for resource questions
."
这是我的代码示例:
api :DELETE, '/questions/:id', 'Deletes question. Note that the delete cascades and also removes any child questions.'
param :id, :number
def destroy
@question = Question.find(params[:id])
@question.destroy_cascade
head :ok
end
页面如下所示——所有这些链接都将我带到错误页面
奇怪的是,如果我查看 json 版本似乎没问题(即它包含所有信息)。
我最终需要将这些行添加到初始化程序中:
config.default_locale = 'en'
config.languages = ['en']
我为我的方法创建了文档,顶级方法描述与其动词一起显示,但是当我单击这些链接中的任何一个时,它会告诉我 "Oops!! Method create.en
not found for resource questions
."
这是我的代码示例:
api :DELETE, '/questions/:id', 'Deletes question. Note that the delete cascades and also removes any child questions.'
param :id, :number
def destroy
@question = Question.find(params[:id])
@question.destroy_cascade
head :ok
end
页面如下所示——所有这些链接都将我带到错误页面
奇怪的是,如果我查看 json 版本似乎没问题(即它包含所有信息)。
我最终需要将这些行添加到初始化程序中:
config.default_locale = 'en'
config.languages = ['en']