我需要从 Ruby of Rails 的方法进行系统调用,但我希望它保持在同一页面上。现在由于某种原因它不执行,但显示:
Routing Error
No route matches [POST] "/devices/22918"
Try running rake routes for more information on available routes.
这是按钮:
<%= link_to image_tag("/images/glossy_green_button.png"), device , :method => :turnon, :confirm => "Are you sure?" %>
这是方法:
def turnon
@device = Device.find(params[:id])
result = `/perl/toggle.pl @device.infodot on`
end
请让我知道我做错了什么,
谢谢你
D