Rails DOM helper id


/ Published in: Rails
Save to your folder(s)

creates something like list_49 with the 49 corresponding to id of record in database.


Copy this code and paste it in your HTML
  1. <% @lists.each do |list| %>
  2. <div id="<%= dom_id(list) %>">
  3. ... rest of list ...
  4. </div>
  5. <% end %>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.