<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -103,13 +103,6 @@ class ApplicationController &lt; ActionController::Base
       end
     end
     
-    def render_message(message)
-      respond_to do |wants|
-        wants.js { render(:update) { |p| p.alert message } }
-        wants.html { render :text =&gt; message, :layout =&gt; true }
-      end
-    end
-    
     def rescue_action_with_page_detection(exception)
       get_site
       path, args = request.request_uri.downcase.split('?')
@@ -145,30 +138,6 @@ class ApplicationController &lt; ActionController::Base
     def add_errors_to_flash(record)
       flash[:warning] = record.errors.full_messages.join('; ')
     end
-        
-    def decimal_in_words(number)
-      if number % 1 == 0.0
-        &quot;exactly #{number}&quot;
-      elsif number % 1 &lt; 0.5
-        &quot;more than #{number.to_i}&quot;
-      elsif number % 1 &gt;= 0.5
-        &quot;less than #{number.to_i + 1}&quot;
-      end
-    end
-    
-    # stolen from ActionView::Helpers::NumberHelper
-    def number_to_phone(number, options = {})
-      options   = options.stringify_keys
-      area_code = options.delete(&quot;area_code&quot;) { false }
-      delimiter = options.delete(&quot;delimiter&quot;) { &quot;-&quot; }
-      extension = options.delete(&quot;extension&quot;) { &quot;&quot; }
-      begin
-        str = area_code == true ? number.to_s.gsub(/([0-9]{3})([0-9]{3})([0-9]{4})/,&quot;(\\1) \\2#{delimiter}\\3&quot;) : number.to_s.gsub(/([0-9]{3})([0-9]{3})([0-9]{4})/,&quot;\\1#{delimiter}\\2#{delimiter}\\3&quot;)
-        extension.to_s.strip.empty? ? str : &quot;#{str} x #{extension.to_s.strip}&quot;
-      rescue
-        number
-      end
-    end
     
     def only_admins
       unless @logged_in.admin?</diff>
      <filename>app/controllers/application.rb</filename>
    </modified>
    <modified>
      <diff>@@ -649,6 +649,8 @@ class Person &lt; ActiveRecord::Base
     find_by_sql(&quot;select distinct service_category from people where service_category is not null and service_category != '' order by service_category&quot;).map { |p| p.service_category }
   end
   
+  include ActionView::Helpers::NumberHelper # number_to_phone used by pdf generation below
+  
   def generate_directory_pdf
     pdf = PDF::Writer.new
     pdf.margins_pt 70, 20, 20, 20
@@ -740,16 +742,3 @@ class Person &lt; ActiveRecord::Base
 
 end
 
-# stolen from ActionView::Helpers::NumberHelper
-def number_to_phone(number, options = {})
-  options   = options.stringify_keys
-  area_code = options.delete(&quot;area_code&quot;) { false }
-  delimiter = options.delete(&quot;delimiter&quot;) { &quot;-&quot; }
-  extension = options.delete(&quot;extension&quot;) { &quot;&quot; }
-  begin
-    str = area_code == true ? number.to_s.gsub(/([0-9]{3})([0-9]{3})([0-9]{4})/,&quot;(\\1) \\2#{delimiter}\\3&quot;) : number.to_s.gsub(/([0-9]{3})([0-9]{3})([0-9]{4})/,&quot;\\1#{delimiter}\\2#{delimiter}\\3&quot;)
-    extension.to_s.strip.empty? ? str : &quot;#{str} x #{extension.to_s.strip}&quot;
-  rescue
-    number
-  end
-end</diff>
      <filename>app/models/person.rb</filename>
    </modified>
    <modified>
      <diff>@@ -101,6 +101,10 @@ class PersonTest &lt; Test::Unit::TestCase
     assert people(:tim).email_changed?
   end
   
+  should &quot;generate a custom directory pdf&quot; do
+    assert_match /PDF\-1\.3/, people(:tim).generate_directory_pdf.to_s[0..100]
+  end
+  
   private
   
     def partial_fixture(table, name, valid_attributes)</diff>
      <filename>test/unit/person_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>31d0bfa15066640b4ba1000ff2c444b8b6a32dee</id>
    </parent>
  </parents>
  <author>
    <name>Tim Morgan</name>
    <email>tim@timmorgan.org</email>
  </author>
  <url>http://github.com/seven1m/onebody/commit/774e4c1209c23c99a044f020e90f18929e69f787</url>
  <id>774e4c1209c23c99a044f020e90f18929e69f787</id>
  <committed-date>2008-08-05T08:51:42-07:00</committed-date>
  <authored-date>2008-08-05T06:14:00-07:00</authored-date>
  <message>Removed unused methods from Application controller.</message>
  <tree>416a77a575d4566bc4f2ddee6d7b20acc07538d0</tree>
  <committer>
    <name>Tim Morgan</name>
    <email>tim@timmorgan.org</email>
  </committer>
</commit>
