Ruby on rails 3.1 将数据传递给modal

Ruby on rails 3.1 将数据传递给modal,ruby-on-rails-3.1,coffeescript,Ruby On Rails 3.1,Coffeescript,在检查Google很长时间后,我找不到解决方案: 这样的链接: <%= link_to instruction.name, "#myModal", :data => {:toggle => "modal",\ :id => instruction.id}, :class=> "openModal"%> {:toggle=>“模态”\ :id=>instruction.id},:class=>openModal%%> 应打开一个模式窗口并显示完整的指令数据。

在检查Google很长时间后,我找不到解决方案:

这样的链接:

<%= link_to instruction.name, "#myModal", :data => {:toggle => "modal",\
:id => instruction.id}, :class=> "openModal"%>
{:toggle=>“模态”\
:id=>instruction.id},:class=>openModal%%>
应打开一个模式窗口并显示完整的指令数据。 使用coffeescript的最佳解决方案是什么

我可以设法在span标记中显示id。 但是如何在
函数中获取id.find(:id)


谢谢你的帮助。

好的。没有人回答。。。我发现自己:

观点:

<%= link_to instruction.name, "#myModal", :data => {:toggle => "modal", :href => instruction_path(instruction)},  :class=> "openModal"%>
适用于Twitter引导

$(document).on "click", ".openModal", ->
$(".modal-body").load($(this).data('href'))