Skip to content

Commit

Permalink
using :time_select when the attribute type is :time in the scaffold g…
Browse files Browse the repository at this point in the history
…enerator. [#2377 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information
Jeff Kreeftmeijer authored and josevalim committed May 16, 2010
1 parent afe57dd commit 4750e61
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions railties/lib/rails/generators/generated_attribute.rb
Expand Up @@ -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
Expand Down

0 comments on commit 4750e61

Please sign in to comment.