Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 3568c5cee0f37f3302d739472be7477bee1b0d2a 1 parent ddadcc7
Jeff Kreeftmeijer jeffkreeftmeijer authored josevalim committed

Showing 1 changed file with 7 additions and 6 deletions. Show diff stats Hide diff stats

  1. +7 6 railties/lib/rails_generator/generated_attribute.rb
13 railties/lib/rails_generator/generated_attribute.rb
@@ -12,12 +12,13 @@ def initialize(name, type)
12 12
13 13 def field_type
14 14 @field_type ||= case type
15   - when :integer, :float, :decimal then :text_field
16   - when :datetime, :timestamp, :time then :datetime_select
17   - when :date then :date_select
18   - when :string then :text_field
19   - when :text then :text_area
20   - when :boolean then :check_box
  15 + when :integer, :float, :decimal then :text_field
  16 + when :time then :time_select
  17 + when :datetime, :timestamp then :datetime_select
  18 + when :date then :date_select
  19 + when :string then :text_field
  20 + when :text then :text_area
  21 + when :boolean then :check_box
21 22 else
22 23 :text_field
23 24 end

0 comments on commit 3568c5c

Please sign in to comment.
Something went wrong with that request. Please try again.