Sign in through GitHub

RailsCasts Pro episodes are now free!

Learn more or hide this

tguevin's Profile

GitHub User: tguevin

Comments by


The previous code works for new models, but you can get the existing id like this:

 <li id="entry_<%= || f.object_name.gsub(/[^0-9]+/,'') %>">

Coda, I found this link:

so your >> here? <<

could be something like

class => "net_device_<%= f.object_name.gsub(/[^0-9]+/,'') %>"

not sure about the content tag and how you specify the class/id for CSS.

I'm using a fieldset as follows:

 <fieldset id="entry_<%= f.object_name.gsub(/[^0-9]+/,'') %>">

Good luck :)