# Agile Web Development with Rails 7: Suggestion - One liner if statement (155)

**URL:** <https://forum.devtalk.com/t/agile-web-development-with-rails-7-suggestion-one-liner-if-statement-155/51660>\
**Category:** PragProg Customers\
**Tags:** book-agile-web-development-with-rails-7, errata\
**Created:** [24 April 2022 18:34 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-suggestion-one-liner-if-statement-155/51660 "2022-04-24T18:34:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joelesli](https://forum.devtalk.com/user_avatar/forum.devtalk.com/joelesli/32/4123_2.png) [@joelesli](https://forum.devtalk.com/u/joelesli)\
**Post date:** [24 April 2022 18:34 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-suggestion-one-liner-if-statement-155/51660/1 "2022-04-24T18:34:21Z")

</div>

Title: Agile Web Development with Rails 7: description (155)

From:

- \<% if line\_item == @current\_item %\>
- ➤ 
- ➤ \<% else %\>
- ➤ 
- ➤ \<% end %\>

To

 \>

As a more concise way to to add the line-item-highlight class.

---

<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:** [24 April 2022 19:59 UTC](https://forum.devtalk.com/t/agile-web-development-with-rails-7-suggestion-one-liner-if-statement-155/51660/2 "2022-04-24T19:59:37Z")

</div>

Your suggestion seems to not have survived. Can I get you to try again?
