<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -642,6 +642,7 @@ module JustinFrench #:nodoc:
           # otherwise assume the input name will be the same as the column type (eg string_input)
           return column.type 
         else
+          return :password if method.to_s =~ /password/
           return :string
         end
       end</diff>
      <filename>lib/justin_french/formtastic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -382,7 +382,13 @@ describe 'Formtastic' do
               @new_post.stub!(:column_for_attribute).and_return(nil)
               default_input_type(nil, :method_without_a_database_column).should == :string
             end
-
+            
+            it 'should default to :password for methods that don\'t have a column in the database but &quot;password&quot; is in the method name' do
+              @new_post.stub!(:password_method_without_a_database_column)
+              @new_post.stub!(:column_for_attribute).and_return(nil)
+              default_input_type(nil, :password_method_without_a_database_column).should == :password
+            end
+            
             it 'should default to :select for column names ending in &quot;_id&quot;' do
               default_input_type(:integer, :user_id).should == :select
               default_input_type(:integer, :section_id).should == :select</diff>
      <filename>spec/formtastic_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5d072fa785fcb064292fa3425294504a74162a29</id>
    </parent>
  </parents>
  <author>
    <name>Andy Pearson</name>
    <login>andypearson</login>
    <email>andy@andy-pearson.com</email>
  </author>
  <url>http://github.com/justinfrench/formtastic/commit/e792a599f6fdd54986bf1ac5a4662c29d32e83ad</url>
  <id>e792a599f6fdd54986bf1ac5a4662c29d32e83ad</id>
  <committed-date>2009-01-28T12:59:19-08:00</committed-date>
  <authored-date>2009-01-28T11:22:33-08:00</authored-date>
  <message>If a database column doesn't exist but the method name contains &quot;password&quot; render a password field as default.

Signed-off-by: Justin French &lt;justin@indent.com.au&gt;</message>
  <tree>e1e96a2730607070bf5b4b6f174be191f56a2818</tree>
  <committer>
    <name>Justin French</name>
    <login>justinfrench</login>
    <email>justin@indent.com.au</email>
  </committer>
</commit>
