title: How to generate an XML list of certain fields from my database in Ruby on Rails?
body: <p>I need to supply data from my Ruby on Rails database to a jquery grid plugin. At the moment, I'm doing it like this:</p>
  
  <pre><code>@notes = current_user.notes.all
  respond_to do |format|
    format.xml  { render :xml =&gt; @notes }
  end
  </code></pre>
  
  <p>But I only want to display certain fields in the grid, so I need to change the code to only send specified fields from the model. What is the easiest way to do this? Thanks for reading.</p>