0

Here is part of my code:

- @search_trees.each do |search_tree|
        %ul
          = link_to search_tree.getname(search_tree.designation_id), {:controller => "search_trees", :action => "catalog", :cat => search_tree.STR_ID}, :class => 'catalog-click', :id => search_tree.STR_ID

As you can see, i'm setting class and id for link, but how to set id for %ul tag? something like this %ul#=search_tree.STR_ID

4

1 に答える 1

1

私は自分で答えを見つけました(誰かがより良い解決策を持っているなら、それを教えてください):

%ul{:id => search_tree.STR_ID}
于 2012-08-01T20:54:25.587 に答える