Permalink
Browse files

using :time_select when the attribute type is :time in the scaffold g…

…enerator. [#2377 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
jeffkreeftmeijer authored and josevalim committed May 14, 2010
1 parent afe57dd commit 4750e61bfecd210e5c4d96546d638b5cd23bb09e
Showing with 7 additions and 6 deletions.
  1. +7 −6 railties/lib/rails/generators/generated_attribute.rb
@@ -9,12 +9,13 @@ def initialize(name, type)
def field_type
@field_type ||= case type
- when :integer, :float, :decimal then :text_field
- when :datetime, :timestamp, :time then :datetime_select
- when :date then :date_select
- when :string then :text_field
- when :text then :text_area
- when :boolean then :check_box
+ when :integer, :float, :decimal then :text_field
+ when :time then :time_select
+ when :datetime, :timestamp then :datetime_select
+ when :date then :date_select
+ when :string then :text_field
+ when :text then :text_area
+ when :boolean then :check_box
else
:text_field
end

0 comments on commit 4750e61

Please sign in to comment.