Skip to content

Files

Latest commit

 

History

History
24 lines (16 loc) · 431 Bytes

Rails-ContentTag.md

File metadata and controls

24 lines (16 loc) · 431 Bytes

Pattern: Use of legacy content_tag

Issue: -

Description

Checks that tag is used instead of content_tag because content_tag is legacy syntax.

Examples

# bad
content_tag(:p, 'Hello world!')
content_tag(:br)

# good
tag.p('Hello world!')
tag.br
content_tag(name, 'Hello world!')

Further Reading