diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2011-12-26 13:56:47 +0100 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2011-12-26 13:56:47 +0100 |
commit | 719ba0b6bb0653da3f35ed55557d7c3f034c092a (patch) | |
tree | 93b3c7e55d9366ca93496977498cf34d2663fd7d /actionpack/lib | |
parent | 76f0fa6066b78cd8f0e139dff4a7b65c96db5778 (diff) | |
download | rails-719ba0b6bb0653da3f35ed55557d7c3f034c092a.tar.gz rails-719ba0b6bb0653da3f35ed55557d7c3f034c092a.tar.bz2 rails-719ba0b6bb0653da3f35ed55557d7c3f034c092a.zip |
Revert "Merge pull request #4154 from nashby/include-blank-date-helper"
This reverts commit 76f0fa6066b78cd8f0e139dff4a7b65c96db5778, reversing
changes made to 28cd098d99c52486aecb72aab39105d8abcd52ad.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/date_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index cf24f27536..2806348337 100644 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -13,7 +13,7 @@ module ActionView # # * <tt>:prefix</tt> - overwrites the default prefix of "date" used for the select names. So specifying "birthday" # would give birthday[month] instead of date[month] if passed to the <tt>select_month</tt> method. - # * <tt>:include_blank</tt> - set to true or to a prompt string if it should be possible to set an empty date. + # * <tt>:include_blank</tt> - set to true if it should be possible to set an empty date. # * <tt>:discard_type</tt> - set to true if you want to discard the type part of the select name. If set to true, # the <tt>select_month</tt> method would use simply "date" (which can be overwritten using <tt>:prefix</tt>) instead # of "date[month]". @@ -887,7 +887,7 @@ module ActionView select_options.merge!(:disabled => 'disabled') if @options[:disabled] select_html = "\n" - select_html << content_tag(:option, "#{ERB::Util.html_escape(@options[:include_blank]) if @options[:include_blank].kind_of?(String)}", :value => '') + "\n" if @options[:include_blank] + select_html << content_tag(:option, '', :value => '') + "\n" if @options[:include_blank] select_html << prompt_option_tag(type, @options[:prompt]) + "\n" if @options[:prompt] select_html << select_options_as_html |