access json.jbuilder file in api
2017-01-23 12:59
351 查看
Missing template api/v2/subjects/fetch_subject, api/base/fetch_subject, application/fetch_subject with {:locale=>[:"zh-CN"], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}.
新建的fetch_subject.json.jbuilder在接口访问不到, http://localhost:3000/api/v2/subjects/516?for_fetch=true
两种方法
(方法一) http://localhost:3000/api/v2/subjects/516.json?for_fetch=true
(方法2)
if params[:for_fetch].present?
render :fetch_subject, formats: [:json]
else
render :show
end
新建的fetch_subject.json.jbuilder在接口访问不到, http://localhost:3000/api/v2/subjects/516?for_fetch=true
两种方法
(方法一) http://localhost:3000/api/v2/subjects/516.json?for_fetch=true
(方法2)
if params[:for_fetch].present?
render :fetch_subject, formats: [:json]
else
render :show
end
相关文章推荐
- access json.jbuilder file in api
- prjGetWriteINIFile - How to Read-Write INI file using VB & API - 读取/写入INI文件 - VB6 + API - SourceCode - HackerJLY
- wxWidgets access html file in zip package
- Class org.apache.struts2.json.JSONWriter can not access a member of class org.springframework.aop.in
- think in java - io - RandomAccessFile
- Missing access checks in put_user/get_user kernel API (CVE-2013-6282)
- You cannot access the client's file system using the FileSystemObject in your ASP code
- Replace JSON.NET with ServiceStack.Text in ASP.NET Web API
- JSON API in Javascript
- 错误提示「URL file-access is disabled in the server configuration」解决方案
- Monitor File Access in Ubuntu
- Python_API_File and Directory Access_os.path.normcase
- Python_API_File and Directory Access_glob.glob
- Python_API_File and Directory Access_os.path.split
- Speed up file access in unzip.c
- 核心驱动文件操作 How to access file in Kernel
- Python_API_File and Directory Access_os.path.expanduser
- How to Access and Use the Windows Hosts File in Windows 7 and Vista
- JQuery file upload Access is denied in IE 7, 8, 9
- Method and system for implementing mandatory file access control in native discretionary access control environments