Hi there! (noob here, so this q may be really dumb) I''ve got a function that generates some HTML to assist the developers (very similar to the form_tag ones): def lozenge_bar ( black=false, blue=false, id="", &block ) content = capture( &block ) concat( tag(:div, {:class => "lozenge bar #{black||blue}", :id => id}, true ), block.binding ) concat( content, block.binding ) concat( "</div>", block.binding ) end I need to extend it so it processes the html assigned to "content". As an example, I need it to get the first and last div in "content" and alter it a little. Are there any helpers built into RoR that can assist me in this? I''ve had a look at HTML::Selector, but I can never seem to get it to work (I keep on getting "uninitialized constant HTML::Selector"), not sure if its going to do what I need it to do anyway.... Thanks! -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---