From 43f6643b8b3a6892105ba9db23bdafd4c8d49ac3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 21 Dec 2005 06:16:42 +0000 Subject: Fix form_for use of datetime_select and date_select as well as a few stylistic upgrades to AR git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3330 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_view/helpers/date_helper.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_view/helpers/date_helper.rb') diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index 397e47d616..0040095669 100755 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -76,8 +76,8 @@ module ActionView # date_select("user", "birthday", :order => [:month, :day]) # # The selects are prepared for multi-parameter assignment to an Active Record object. - def date_select(object, method, options = {}) - InstanceTag.new(object, method, self).to_date_select_tag(options) + def date_select(object_name, method, options = {}) + InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_date_select_tag(options) end # Returns a set of select tags (one for year, month, day, hour, and minute) pre-selected for accessing a specified datetime-based @@ -87,8 +87,8 @@ module ActionView # datetime_select("post", "written_on", :start_year => 1995) # # The selects are prepared for multi-parameter assignment to an Active Record object. - def datetime_select(object, method, options = {}) - InstanceTag.new(object, method, self).to_datetime_select_tag(options) + def datetime_select(object_name, method, options = {}) + InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_datetime_select_tag(options) end # Returns a set of html select-tags (one for year, month, and day) pre-selected with the +date+. -- cgit v1.2.3