0

我想在link_to语句中传递一个 div。这对我不起作用:

 <%= link_to :controller => 'abouts', :action => 'index', :anchor => 'teacher-account' do %>
    <div class="accordion-inner">
         About Me
    </div>
   <%= end %>
4

1 回答 1

1

link_to助手支持一些选项来传递和url例如htmllink_to(body, url_options = {}, html_options = {}).

所以你也许可以试试这个:

link_to('About me', { controller: 'abouts', action: 'index' }, anchor: 'teacher-account', class: "accordion-inner")
于 2013-10-15T22:46:47.730 回答