Skip to content

Commit df2961b

Browse files
Put Ruby code in ERB tags [ci-skip]
This allows the code to be properly syntax-highlighted.
1 parent ed694bf commit df2961b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

actionview/lib/action_view/helpers/text_helper.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ def simple_format(text, html_options = {}, options = {})
349349
# and passing the name of the cycle. The current cycle string can be obtained
350350
# anytime using the current_cycle method.
351351
#
352-
# # Alternate CSS classes for even and odd numbers...
353-
# @items = [1,2,3,4]
352+
# <%# Alternate CSS classes for even and odd numbers... %>
353+
# <% @items = [1,2,3,4] %>
354354
# <table>
355355
# <% @items.each do |item| %>
356356
# <tr class="<%= cycle("odd", "even") -%>">
@@ -360,12 +360,12 @@ def simple_format(text, html_options = {}, options = {})
360360
# </table>
361361
#
362362
#
363-
# # Cycle CSS classes for rows, and text colors for values within each row
364-
# @items = [
363+
# <%# Cycle CSS classes for rows, and text colors for values within each row %>
364+
# <% @items = [
365365
# { first: "Robert", middle: "Daniel", last: "James" },
366366
# { first: "Emily", middle: "Shannon", maiden: "Pike", last: "Hicks" },
367367
# { first: "June", middle: "Dae", last: "Jones" },
368-
# ]
368+
# ] %>
369369
# <% @items.each do |item| %>
370370
# <tr class="<%= cycle("odd", "even", name: "row_class") -%>">
371371
# <td>
@@ -396,8 +396,8 @@ def cycle(first_value, *values)
396396
# for complex table highlighting or any other design need which requires
397397
# the current cycle string in more than one place.
398398
#
399-
# # Alternate background colors
400-
# @items = [1,2,3,4]
399+
# <%# Alternate background colors %>
400+
# <% @items = [1,2,3,4] %>
401401
# <% @items.each do |item| %>
402402
# <div style="background-color:<%= cycle("red","white","blue") %>">
403403
# <span style="background-color:<%= current_cycle %>"><%= item %></span>
@@ -411,8 +411,8 @@ def current_cycle(name = "default")
411411
# Resets a cycle so that it starts from the first element the next time
412412
# it is called. Pass in +name+ to reset a named cycle.
413413
#
414-
# # Alternate CSS classes for even and odd numbers...
415-
# @items = [[1,2,3,4], [5,6,3], [3,4,5,6,7,4]]
414+
# <%# Alternate CSS classes for even and odd numbers... %>
415+
# <% @items = [[1,2,3,4], [5,6,3], [3,4,5,6,7,4]] %>
416416
# <table>
417417
# <% @items.each do |item| %>
418418
# <tr class="<%= cycle("even", "odd") -%>">

0 commit comments

Comments
 (0)