Permalink
Browse files

fixing the ternary operation where the logic is very confusing.

[#5136 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 4a0d7c1 commit 1f499e6d4cb1055de952957e3c9bd770e0219cc1 Neeraj Singh committed with josevalim Jul 17, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 actionpack/lib/action_view/helpers/date_helper.rb
@@ -800,7 +800,8 @@ def build_options(selected, options = {})
start = options.delete(:start) || 0
stop = options.delete(:end) || 59
step = options.delete(:step) || 1
- leading_zeros = options.delete(:leading_zeros).nil? ? true : false
+ options.reverse_merge!({:leading_zeros => true})
+ leading_zeros = options.delete(:leading_zeros)
select_options = []
start.step(stop, step) do |i|

0 comments on commit 1f499e6

Please sign in to comment.