Ok, i'm working on views for my little project. Every day I make things like this:
<li <%= 'class="'+item.status.caption+'"' if %w{ sold, absent }.include?(item.status.caption) %> >
Recently, I found a proper String method in Ruby API, called quote. I wrote this:
<li <%= 'class='+item.status.caption.quote if %w{ sold, absent }.include?(item.status.caption) %> >
but application dropped an error, saying it does not recognize the method. So, is there a proper method to do such usual quotation (or, even, 'somethination' with a custom symbol/string :P )? Anything like 'surround_with' or something? Didn't found a clue in Rail API.