another case of extra nil? check

This commit is contained in:
Neeraj Singh
2010-09-30 02:27:13 +08:00
committed by Aaron Patterson
parent 08a08d97dd
commit 618407db56

View File

@@ -365,7 +365,7 @@ module ActionView
# <% 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