Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/55.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails Jquery变量作为参数,链接到_Ruby On Rails_Ruby On Rails 3 - Fatal编程技术网

Ruby on rails Jquery变量作为参数,链接到

Ruby on rails Jquery变量作为参数,链接到,ruby-on-rails,ruby-on-rails-3,Ruby On Rails,Ruby On Rails 3,在我看来,我有一个链接: <%= link_to "#{g.nummer} #{g.bezeichnung}", icd_test_path(g, :number => "JQUERY"), remote: true, :class => "tests" %> 我该怎么做呢?只需在链接中添加一个:id=>“number”: <%= link_to "#{g.nummer} #{g.bezeichnung}", icd_test_path(g, :number

在我看来,我有一个链接:

<%= link_to "#{g.nummer} #{g.bezeichnung}", icd_test_path(g, :number => "JQUERY"), remote: true, :class => "tests" %>

我该怎么做呢?

只需在
链接中添加一个
:id=>“number”

<%= link_to "#{g.nummer} #{g.bezeichnung}", 
  icd_test_path(g, :number => "JQUERY"), 
  remote: true, 
  :class => "tests",
  :id => 'number' %>
“JQUERY”),
遥控器:是的,
:class=>“测试”,
:id=>'编号'%>

我不希望它有id=>编号!!我想要在我的链接中带有id号的a标签的内容作为参数:numberWell,不清楚你在问什么。即使你现在解释了。新问题:
$(#number).html() 
<%= link_to "#{g.nummer} #{g.bezeichnung}", 
  icd_test_path(g, :number => "JQUERY"), 
  remote: true, 
  :class => "tests",
  :id => 'number' %>