Permalink
Browse files

Added :time_zone input information to README.

Signed-off-by: Justin French <justin@indent.com.au>
  • Loading branch information...
1 parent 1de3ebd commit 07380d4da7dd4843a8dcc187aad89e7c9b437025 @josevalim josevalim committed with Apr 18, 2009
Showing with 2 additions and 2 deletions.
  1. +1 −1 README.textile
  2. +1 −1 lib/formtastic.rb
View
@@ -214,13 +214,13 @@ h2. The Available Inputs
* :select (a select menu) - default for ActiveRecord associations (belongs_to, has_many, has_and_belongs_to_many)
* :radio (a set of radio inputs) - alternative to :select for ActiveRecord belongs_to associations
+* :time_zone (a select input) - default for :string column types with 'time_zone' in the method name
* :password (a password input) - default for :string column types with 'password' in the method name
* :text (a textarea) - default for :text column types
* :date (a date select) - default for :date column types
* :datetime (a date and time select) - default for :datetime and :timestamp column types
* :time (a time select) - default for :time column types
* :boolean (a checkbox) - default for :boolean column types
-* :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) - default for paperclip or attachment_fu attributes
View
@@ -831,7 +831,7 @@ def default_input_type(method) #:nodoc:
if column
# handle the special cases where the column type doesn't map to an input method
- return :time_zone if column.type == :string && method.to_s =~ /time_?zone/
+ return :time_zone if column.type == :string && method.to_s =~ /time_zone/
return :select if column.type == :integer && method.to_s =~ /_id$/
return :datetime if column.type == :timestamp
return :numeric if [:integer, :float, :decimal].include?(column.type)

0 comments on commit 07380d4

Please sign in to comment.