mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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>
This commit is contained in:
committed by
José Valim
parent
afe57dda26
commit
4750e61bfe
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user