diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-12-21 06:16:42 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-12-21 06:16:42 +0000 |
commit | 43f6643b8b3a6892105ba9db23bdafd4c8d49ac3 (patch) | |
tree | a6d131709f797602f38f1485602ea74297a7a47e /actionpack | |
parent | 71dcc6982e7dcf29675cd3871523e6bdb9cd05a3 (diff) | |
download | rails-43f6643b8b3a6892105ba9db23bdafd4c8d49ac3.tar.gz rails-43f6643b8b3a6892105ba9db23bdafd4c8d49ac3.tar.bz2 rails-43f6643b8b3a6892105ba9db23bdafd4c8d49ac3.zip |
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
Diffstat (limited to 'actionpack')
-rwxr-xr-x | actionpack/lib/action_view/helpers/date_helper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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+. |