One idea off the top of my head: Create a helper method and use content_tag
def give_it_to_me html_content = content_tag(:span, 'This is DRY') defined?(skipLI) && skipLI ? html_content : content_tag(:li, html_content) end I think this will work. Jamey On Tue, Jul 19, 2011 at 12:54 PM, Chris Braddock <[email protected]>wrote: > Can I do it without resorting to making another partial to contain the > %span content below? > > # partial begin > - if defined(skipLI) && skipLI > %span this is not DRY > - else > %li > %span this is not DRY > # partial end > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/LIoHBKXXDxIJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

