aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/date_helper.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-11-13 11:13:11 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-11-13 11:13:11 +0000
commit947cec29d5f074682052e8412904cc88a914fdbc (patch)
tree2888aa13f47984175aba6f83bacf6e925b5d5a60 /actionpack/lib/action_view/helpers/date_helper.rb
parent4a5b042fc7805f95b4a096cafe0d57e105246095 (diff)
downloadrails-947cec29d5f074682052e8412904cc88a914fdbc.tar.gz
rails-947cec29d5f074682052e8412904cc88a914fdbc.tar.bz2
rails-947cec29d5f074682052e8412904cc88a914fdbc.zip
Added FormHelper#form_for and FormHelper#fields_for that makes it easier to work with forms for single objects also if they don't reside in instance variables [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3003 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers/date_helper.rb')
-rwxr-xr-xactionpack/lib/action_view/helpers/date_helper.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index ba1834b54e..397e47d616 100755
--- a/actionpack/lib/action_view/helpers/date_helper.rb
+++ b/actionpack/lib/action_view/helpers/date_helper.rb
@@ -293,5 +293,15 @@ module ActionView
datetime_select
end
end
+
+ class FormBuilder
+ def date_select(method, options = {})
+ @template.date_select(@object_name, method, options.merge(:object => @object))
+ end
+
+ def datetime_select(method, options = {})
+ @template.datetime_select(@object_name, method, options.merge(:object => @object))
+ end
+ end
end
end