From 9b3ecc7a8f87f908139acd7dc6f596ac58704754 Mon Sep 17 00:00:00 2001 From: Alexander Semyonov Date: Fri, 10 Sep 2010 22:31:57 +0400 Subject: [PATCH] Added simple_datetime_input helper to Espresso::View::FormBuilder --- lib/espresso/view/form_builder.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/espresso/view/form_builder.rb b/lib/espresso/view/form_builder.rb index 8c0178e..bb38b5c 100644 --- a/lib/espresso/view/form_builder.rb +++ b/lib/espresso/view/form_builder.rb @@ -42,6 +42,12 @@ def simple_date_input(method, options) self.date_select(method, html_options) end + def simple_datetime_input(method, options) + html_options = options.delete(:input_html) { {} } + self.label(method, options_for_label(options)) << + self.datetime_select(method, html_options) + end + def phone_input(method, options) basic_input_helper(:phone_field, :string, method, options) end