Skip to content

Commit 9726c29

Browse files
author
Matthew Bellantoni
committed
Deprecate DatetimeInput.
1 parent 9898bc2 commit 9726c29

File tree

3 files changed

+14
-124
lines changed

3 files changed

+14
-124
lines changed

lib/formtastic-bootstrap/inputs.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ module FormtasticBootstrap
22
module Inputs
33

44
autoload :Base, "formtastic-bootstrap/inputs/base"
5-
# autoload :Basic
5+
# autoload :Basic
66
autoload :BooleanInput, "formtastic-bootstrap/inputs/boolean_input"
77
autoload :CheckBoxesInput, "formtastic-bootstrap/inputs/check_boxes_input"
8-
# autoload :CountryInput
8+
# autoload :CountryInput # Come back to this.
99
autoload :DateInput, "formtastic-bootstrap/inputs/date_input"
10-
# autoload :DatePickerInput
10+
# autoload :DatePickerInput # Come back to this.
1111
# autoload :DatetimePickerInput
1212
autoload :DateSelectInput, "formtastic-bootstrap/inputs/date_select_input"
13-
# autoload :DatetimeInput
13+
autoload :DatetimeInput, "formtastic-bootstrap/inputs/datetime_input"
1414
# autoload :DatetimeSelectInput
1515
# autoload :EmailInput
1616
# autoload :FileInput
Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1-
# module FormtasticBootstrap
2-
# module Inputs
3-
# class DatetimeInput < Formtastic::Inputs::DatetimeInput
4-
# include Base
5-
# include Base::Stringish
6-
# include Base::Timeish
7-
#
8-
# def to_html
9-
# generic_input_wrapping do
10-
# inline_inputs_div_wrapping do
11-
# # This newline matters.
12-
# date_input_html << "\n".html_safe << time_input_html
13-
# end
14-
# end
15-
# end
16-
#
17-
# end
18-
# end
19-
# end
1+
module FormtasticBootstrap
2+
module Inputs
3+
class DatetimeInput < Formtastic::Inputs::DatetimeInput
4+
def to_html
5+
::ActiveSupport::Deprecation.warn("DatetimeInput (:as => :datetime) has been renamed to DatetimeSelectInput (:as => :datetime_select) and will be removed or changed in the next version of Formtastic, please update your forms.", caller(2))
6+
super
7+
end
8+
end
9+
end
10+
end

spec/inputs/datetime_input_spec.rb

Lines changed: 0 additions & 101 deletions
This file was deleted.

0 commit comments

Comments
 (0)