Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 3568c5cee0f37f3302d739472be7477bee1b0d2a 1 parent ddadcc7
@jeffkreeftmeijer jeffkreeftmeijer authored josevalim committed
Showing with 7 additions and 6 deletions.
  1. +7 −6 railties/lib/rails_generator/generated_attribute.rb
View
13 railties/lib/rails_generator/generated_attribute.rb
@@ -12,12 +12,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 3568c5c

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