diff options
author | Jeff Kreeftmeijer <jeff@kreeftmeijer.nl> | 2010-05-14 22:14:49 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-05-16 10:52:36 +0200 |
commit | 4750e61bfecd210e5c4d96546d638b5cd23bb09e (patch) | |
tree | 5e41a568872f5c76fa1cd1ad7997d977618651ed /railties | |
parent | afe57dda26b8ca8484a90801a0fd378dad60e180 (diff) | |
download | rails-4750e61bfecd210e5c4d96546d638b5cd23bb09e.tar.gz rails-4750e61bfecd210e5c4d96546d638b5cd23bb09e.tar.bz2 rails-4750e61bfecd210e5c4d96546d638b5cd23bb09e.zip |
using :time_select when the attribute type is :time in the scaffold generator. [#2377 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/generated_attribute.rb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/railties/lib/rails/generators/generated_attribute.rb b/railties/lib/rails/generators/generated_attribute.rb index e962308585..f01934f946 100644 --- a/railties/lib/rails/generators/generated_attribute.rb +++ b/railties/lib/rails/generators/generated_attribute.rb @@ -9,12 +9,13 @@ module Rails 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 |