aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-06-15 01:58:32 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-06-15 01:58:32 +0000
commit1ddaec1e68ae35509d665dbfc5d7f9ae87f41962 (patch)
tree99f18084a8225fee82d7e920e380ce763fab0ae2 /actionpack/lib/action_view/helpers
parent594581685e1aed75b56edf513de2654de7d932ae (diff)
downloadrails-1ddaec1e68ae35509d665dbfc5d7f9ae87f41962.tar.gz
rails-1ddaec1e68ae35509d665dbfc5d7f9ae87f41962.tar.bz2
rails-1ddaec1e68ae35509d665dbfc5d7f9ae87f41962.zip
Only change date to beginning of month if it isn't nil.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7027 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rwxr-xr-xactionpack/lib/action_view/helpers/date_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index c686982056..6ab2596439 100755
--- a/actionpack/lib/action_view/helpers/date_helper.rb
+++ b/actionpack/lib/action_view/helpers/date_helper.rb
@@ -389,7 +389,7 @@ module ActionView
# If the day is hidden and the month is visible, the day should be set to the 1st so all month choices are valid
# (otherwise it could be 31 and february wouldn't be a valid date)
- if discard[:day] && !discard[:month]
+ if datetime && discard[:day] && !discard[:month]
datetime = datetime.change(:day => 1)
end