我在html.erb视图中的rails <%= link_to au.name, active_academic_titles_path(:academic_unit_id => au.id, :exam_period_id => ELEMENT_VALUE ), :remote => true, :class=>"menu-units" %>
上有这个ruby。我想将html元素的值放到此链接中。
我尝试过这样做<%= link_to au.name, active_academic_titles_path(:academic_unit_id => au.id, :exam_period_id => %> ELEMENT_VALUE <%= ), :remote => true, :class=>"menu-units" %>
,
我收到此错误
/student_exams/app/views/exams/_academic_units.html.erb:5: syntax error, unexpected ')' ... => au.id, :exam_period_id => );@output_buffer.safe_append='... ... ^ /student_exams/app/views/exams/_academic_units.html.erb:5: syntax error, unexpected =>, expecting ')' ...t_buffer.append=( ), :remote => true, :class=>"menu-units... ... ^ /student_exams/app/views/exams/_academic_units.html.erb:5: Can't assign to true ...er.append=( ), :remote => true, :class=>"menu-units" );@o... ... ^ /student_exams/app/views/exams/_academic_units.html.erb:5: syntax error, unexpected =>, expecting :: or '[' or '.' ...=( ), :remote => true, :class=>"menu-units" );@output_buf... ... ^ /student_exams/app/views/exams/_academic_units.html.erb:12: syntax error, unexpected keyword_do_block, expecting keyword_end '.freeze; AcademicUnit.all.each do | au | ^ /student_exams/app/views/exams/_academic_units.html.erb:22: syntax error, unexpected keyword_ensure, expecting end-of-input