9
如何在使用Ajax時渲染不同的.js.erb
文件?使用Rails Ajax渲染不同的.js文件
例如:
<% form_tag user_path, :method => :get, :remote => true do %>
此穿過UserController#show
然後呈現users/show.js.erb
。如何通過UserController#show
然後渲染users/hello.js.erb
?