will_pickdate 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/will_pickdate/pickdate_builder.rb +11 -2
- data/lib/will_pickdate/version.rb +1 -1
- metadata +1 -1
@@ -5,8 +5,7 @@ module PickdateHelper
|
|
5
5
|
InstanceTag.new(object_name, method, self, options.delete(:object)).to_datetime_field_tag(options)
|
6
6
|
end
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
module PickdateHelperInstanceTag
|
10
9
|
def to_datetime_field_tag(options = {})
|
11
10
|
options = options.stringify_keys
|
12
11
|
options = DEFAULT_FIELD_OPTIONS.merge(options)
|
@@ -18,4 +17,14 @@ module PickdateHelper
|
|
18
17
|
tag("input", options)
|
19
18
|
end
|
20
19
|
end
|
20
|
+
|
21
|
+
class InstanceTag
|
22
|
+
include PickdateHelperInstanceTag
|
23
|
+
end
|
24
|
+
|
25
|
+
class FormBuilder
|
26
|
+
def datetime_field(method, options = {})
|
27
|
+
@template.datetime_select(@object_name, method, objectify_options(options))
|
28
|
+
end
|
29
|
+
end
|
21
30
|
end
|