anchor.diff:  
   <p>In order to log food, you'll also need to supply the food unit to use.  Fitgem provides the <code>foods_units</code> method to retrieve the list of food units.</p>
   
  -<pre class="prettyprint linenums lang-ruby">@search_results = client.find_food('banana')
  +<pre><code class="ruby">@search_results = client.find_food('banana')
   @food_units = client.foods_units
  -</pre>
  +</code></pre>
   
   <h3>Food Search Example</h3>
   <p>
  
positive.code: <ul class="pager">
    <li class="previous">
      <%= link_to "&larr; Fitbit Resources: Activities".html_safe, guide_activities_path %>
    </li>
    <li class="next">
      <%= link_to "Fitbit Data Subscriptions &rarr;".html_safe, guide_subscriptions_path %>
    </li>
  </ul>
  
  <div class="page-header">
    <h1>Fitbit Resources: Foods <small>Chapter 6</small></h1>
  </div>
  
  <p>There are two aspects of foods that are tracked by Fitbit: the list of foods that can be used to log user meals, as well as food activity specific to a user.</p>
  
  <h3>Food Search and Food Units</h3>
  
  <div class="alert alert-info">
    <i class="icon-book"></i>
    View the Fitbit reference page for searching <a href="http://wiki.fitbit.com/display/API/API-Search-Foods">foods</a> and retrieving <a href="http://wiki.fitbit.com/display/API/API-Get-Food-Units">food units</a> for more information on the underlying REST API.
  </div>
  
  
negative.code: 
  <div class="fitbit-data-view" id="fitbit-food-search">Loading...</div>
  
  <h3>Retrieving User Foods</h3>
  
  <div class="panel callout radius">
    <i class="fa fa-book"></i>&nbsp;
    View the Fitbit reference page for retrieving <a href="http://wiki.fitbit.com/display/API/API-Get-Recent-Foods">recent</a>, <a href="http://wiki.fitbit.com/display/API/API-Get-Frequent-Foods">frequent</a>, or <a href="http://wiki.fitbit.com/display/API/API-Get-Favorite-Foods">favorite</a> food data for a specific user for more information on the underlying REST API..</a>
  </div>
  
  <p>Much like when working with activities a user's food preferences can be access via the recent, frequent, or favorite metadata collections.</p>
  
  <pre><code class="ruby">@recent_foods = client.recent_foods
  @frequent_foods = client.frequent_foods
  @favorite_foods = client.favorite_foods
  </code></pre>
  
  <h3>Logging User Foods</h3>
  
  <div class="panel callout radius">
    <i class="fa fa-book"></i>&nbsp;
    View the Fitbit reference page for <a href="http://wiki.fitbit.com/display/API/API-Log-Food">logging users' foods</a> for more information on the underlying REST API.
  </div>
  
  <p>To log the consumption of a food item, you must supply several IDs of items that would be found through searching for foods or through the metadata collections (recent, frequent, or favorites). </p>
  
  <pre><code class="ruby">client.log_food({
    :foodId => 81170, # BACON!
    :mealTypeId => 1, # Breakfast!
    :unitId => 311,
    :amount => 1,
    :date => "2011-08-01"
  })
  </code></pre>
  
  <h3>Creating User Foods</h3>
  
  <div class="panel callout radius">
    <i class="fa fa-book"></i>&nbsp;
    View the Fitbit reference page for <a href="http://wiki.fitbit.com/display/API/API-Create-Food">creating users' foods</a> for more information on the underlying REST API.
  </div>
  
  <p>Sometimes a user may wish to log a food that isn't in the official list you can query through Fitbit.  You can use the <code>create_food</code> method to create private foods to log.  The API doesn't expose as many options for customizing created foods as the Fitbit website does, but it will allow you create a basic food profile that can be expanded later via the website.</p>
  
  <pre><code class="ruby">client.create_food({
    :name => "Amplified Wheybolic Extreme 60 (Cookies & Cream)",
    :defaultFoodMeasurementUnitId => "301",
    :defaultServingSize => "3",
  