[英]How do I override the format type in a form for Rails 3.2?
我的默认格式设置为json,但我想在用户从网站提交表单时覆盖它。
我想在表单中执行以下操作:
%form{ :method => 'POST', :action => a_path , options: [format: :html]}
有什么办法吗?
它是:
%form{ :method => 'POST', :action => api_quizzes_path(format: :html)}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.