Permalink
Browse files

another case of extra nil? check

  • Loading branch information...
1 parent 08a08d9 commit 618407db56b39a4130e05779339534ae2ebf883e Neeraj Singh committed with tenderlove Sep 29, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_view/helpers/text_helper.rb
@@ -365,7 +365,7 @@ def cycle(first_value, *values)
# <% end %>
def current_cycle(name = "default")
cycle = get_cycle(name)
- cycle.current_value unless cycle.nil?
+ cycle.current_value if cycle
end
# Resets a cycle so that it starts from the first element the next time

0 comments on commit 618407d

Please sign in to comment.