# Agile Web Development with Rails 7: (page 80)

**URL:** <https://forum.devtalk.com/t/agile-web-development-with-rails-7-page-80/53694>\
**Category:** PragProg Customers\
**Tags:** book-agile-web-development-with-rails-7, errata\
**Created:** [7 May 2022 08:40 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-page-80/53694 "2022-05-07T08:40:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ziyunli](https://forum.devtalk.com/user_avatar/forum.devtalk.com/ziyunli/32/2694_2.png) [@ziyunli](https://forum.devtalk.com/u/ziyunli)\
**Post date:** [7 May 2022 08:40 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-page-80/53694/1 "2022-05-07T08:40:03Z")

</div>

> The rows in the listing have alternating background colors. The Rails helper method called does this by setting the CSS class of each row to either bg-green-50 or bg-white, automatically toggling between the two style names on successive lines.

It mentions a helper method, but doesn’t say what that is. It took me a bit to read the code and realized it’s referring to the `cycle('bg-green-50', 'bg-white')` line.

Suggestion: add `cycle` in the quoted text, “The Rails helper method called cycle does this by setting the CSS class…” to make it clea

---

<div class="post-metadata">

**Author:** ![rubys](https://forum.devtalk.com/user_avatar/forum.devtalk.com/rubys/32/3797_2.png) [@rubys](https://forum.devtalk.com/u/rubys)\
**Post date:** [9 June 2022 14:10 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-page-80/53694/2 "2022-06-09T14:10:12Z")

</div>

Fixed. Thanks!
