aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/active_record_helper.rb
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2008-03-02 04:40:54 +0000
committerMichael Koziarski <michael@koziarski.com>2008-03-02 04:40:54 +0000
commit4673c47d7beae5bb5a79841d517b5c5d9b22579a (patch)
tree05b957b49a60019fae4794677f8765ed81f05d2b /actionpack/lib/action_view/helpers/active_record_helper.rb
parent6da3771346ef45f8295c4ba7c0ce55c8ae91bbc2 (diff)
downloadrails-4673c47d7beae5bb5a79841d517b5c5d9b22579a.tar.gz
rails-4673c47d7beae5bb5a79841d517b5c5d9b22579a.tar.bz2
rails-4673c47d7beae5bb5a79841d517b5c5d9b22579a.zip
Allow html_options to be passed to all the date helpers. Closes #6000 [h-lame, Jakob S]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8968 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers/active_record_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/active_record_helper.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_record_helper.rb
index 170ad84e43..7569cc381d 100644
--- a/actionpack/lib/action_view/helpers/active_record_helper.rb
+++ b/actionpack/lib/action_view/helpers/active_record_helper.rb
@@ -220,29 +220,29 @@ module ActionView
end
alias_method :to_date_select_tag_without_error_wrapping, :to_date_select_tag
- def to_date_select_tag(options = {})
+ def to_date_select_tag(options = {}, html_options = {})
if object.respond_to?("errors") && object.errors.respond_to?("on")
- error_wrapping(to_date_select_tag_without_error_wrapping(options), object.errors.on(@method_name))
+ error_wrapping(to_date_select_tag_without_error_wrapping(options, html_options), object.errors.on(@method_name))
else
- to_date_select_tag_without_error_wrapping(options)
+ to_date_select_tag_without_error_wrapping(options, html_options)
end
end
alias_method :to_datetime_select_tag_without_error_wrapping, :to_datetime_select_tag
- def to_datetime_select_tag(options = {})
+ def to_datetime_select_tag(options = {}, html_options = {})
if object.respond_to?("errors") && object.errors.respond_to?("on")
- error_wrapping(to_datetime_select_tag_without_error_wrapping(options), object.errors.on(@method_name))
+ error_wrapping(to_datetime_select_tag_without_error_wrapping(options, html_options), object.errors.on(@method_name))
else
- to_datetime_select_tag_without_error_wrapping(options)
+ to_datetime_select_tag_without_error_wrapping(options, html_options)
end
end
alias_method :to_time_select_tag_without_error_wrapping, :to_time_select_tag
- def to_time_select_tag(options = {})
+ def to_time_select_tag(options = {}, html_options = {})
if object.respond_to?("errors") && object.errors.respond_to?("on")
- error_wrapping(to_time_select_tag_without_error_wrapping(options), object.errors.on(@method_name))
+ error_wrapping(to_time_select_tag_without_error_wrapping(options, html_options), object.errors.on(@method_name))
else
- to_time_select_tag_without_error_wrapping(options)
+ to_time_select_tag_without_error_wrapping(options, html_options)
end
end