Skip to content

Files

Latest commit

 

History

History
25 lines (16 loc) · 588 Bytes

Rails-UnusedRenderContent.md

File metadata and controls

25 lines (16 loc) · 588 Bytes

Pattern: Unused render content

Issue: -

Description

If you try to render content along with a non-content status code (100-199, 204, 205, or 304), it will be dropped from the response.

This rule checks for uses of render which specify both body content and a non-content status.

Examples

# bad
render 'foo', status: :continue
render status: 100, plain: 'Ruby!'

# good
head :continue
head 100

Further Reading