<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -67,6 +67,7 @@ h2. The Available Inputs
 * :boolean_select (a yes/no select box)
 * :string (a text field) - default for :string column types
 * :numeric (a text field, like string) - default for :integer, :float and :decimal column types
+* :file (a file field)
 
 The documentation is pretty good for each of these (what it does, what the output is, etc) so go check it out.
 
@@ -74,7 +75,7 @@ The documentation is pretty good for each of these (what it does, what the outpu
 h3. One day...
 
 * calendars and other more humanized date/time selections
-* vanilla html file selection to work well with things like ThoughtBot's &quot;Paperclip&quot;:http://www.thoughtbot.com/projects/paperclip
+* -vanilla html file selection to work well with things like ThoughtBot's &quot;Paperclip&quot;:http://www.thoughtbot.com/projects/paperclip-
 * flash-based multi-file selection
 * an interface for tagging and other has_many_through style associations
 </diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -350,6 +350,12 @@ module JustinFrench #:nodoc:
         input_label(method, options) + 
         template.text_field(@object_name, method, default_string_options(method))
       end
+      
+      # Outputs label and file field
+      def file_input(method, options)
+        input_label(method, options) + 
+        template.file_field(@object_name, method)
+      end
        
             
       # Outputs a fieldset with a legend for the method label, and a ordered list (ol) of list</diff>
      <filename>lib/justin_french/formtastic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -367,7 +367,7 @@ describe 'Formtastic' do
           end
 
           it 'should call the corresponding input method' do
-            [:select, :radio, :password, :text, :date, :datetime, :time, :boolean, :boolean_select, :string, :numeric].each do |input_style|
+            [:select, :radio, :password, :text, :date, :datetime, :time, :boolean, :boolean_select, :string, :numeric, :file].each do |input_style|
               @new_post.stub!(:generic_column_name)
               @new_post.stub!(:column_for_attribute).and_return(mock('column', :type =&gt; :string, :limit =&gt; 255))
               semantic_form_for(@new_post) do |builder| 
@@ -1188,6 +1188,38 @@ describe 'Formtastic' do
 
       end
       
+      describe ':as =&gt; :file' do
+        setup do 
+          @new_post.stub!(:some_file)
+          @new_post.stub!(:column_for_attribute).and_return(mock('column', :type =&gt; :string, :limit =&gt; 50))
+        
+          semantic_form_for(@new_post) do |builder|
+            concat(builder.input(:some_file, :as =&gt; :file))
+          end
+        end
+        
+        it 'should have a file class on the wrapper' do
+          output_buffer.should have_tag('form li.file')
+        end
+        
+        it 'should have a post_some_file_input id on the wrapper' do
+          output_buffer.should have_tag('form li#post_some_file_input')
+        end
+        
+        it 'should generate a label for the input' do
+          output_buffer.should have_tag('form li label')
+          output_buffer.should have_tag('form li label[@for=&quot;post_some_file&quot;')
+          output_buffer.should have_tag('form li label', /Some file/)
+        end
+        
+        it 'should generate a file input' do
+          output_buffer.should have_tag('form li input')
+          output_buffer.should have_tag('form li input#post_some_file')
+          output_buffer.should have_tag('form li input[@type=&quot;file&quot;]')
+          output_buffer.should have_tag('form li input[@name=&quot;post[some_file]&quot;]')
+        end
+      end
+      
     end
     
     describe '#input_field_set' do</diff>
      <filename>spec/formtastic_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d78390d7a242f6d07e0bb8c5a215b991b07bdfde</id>
    </parent>
  </parents>
  <author>
    <name>Negonicrac</name>
    <email>negonicrac@gmail.com</email>
  </author>
  <url>http://github.com/freelancing-god/formtastic/commit/26b1248f0c5f887dd1577c97a52d143dff5138bd</url>
  <id>26b1248f0c5f887dd1577c97a52d143dff5138bd</id>
  <committed-date>2009-01-04T21:08:38-08:00</committed-date>
  <authored-date>2009-01-04T21:08:38-08:00</authored-date>
  <message>add basic file input with specs. This is a very simple addition that allow the use of :as =&gt; :file to get a file input</message>
  <tree>b04281724ee36b7764400e70c9b7625006a6aaa4</tree>
  <committer>
    <name>Negonicrac</name>
    <email>negonicrac@gmail.com</email>
  </committer>
</commit>
