title: How to modify an attribute of a certain item in a model
body: <p>I have a model called <code>Category</code> which contains categories that are used to categorise products. One of the categories is called <code>Experiences</code>. On a specific query, I'd like to modify it from <code>Experiences</code> to <code>Experiences *</code> for display purposes.</p>
  
  <p>I have tried to do this via a map, but am getting a blank value for <code>Experiences</code>.</p>
  
  <p>This is my code:</p>
  
  <pre><code>  def self.with_exp_star
      Category.all.map { |element|
        if element.name == "Experiences"
          element.name = "Experiences *"
        else
          element
        end
        }
    end
  </code></pre>
  
  <p>Any ideas?</p>