0

Does rails support left and right arrow keys in the :accesskey attribute?

= link_to "< Previous", @vehicle.previous, :accesskey => "LEFT ARROW"
= link_to "Next >", @vehicle.next, :accesskey => "RIGHT ARROW"
4

1 回答 1

2

这不是铁轨的责任。可能您需要一些将按键绑定到链接的 js 插件。

如果要在生成的<a>标签中添加一些属性,请使用:html_optionskey

= link_to "< Previous", @vehicle.previous, :html_options => {:accesskey => "LEFT ARROW"}
于 2013-05-18T13:33:31.050 回答