Class: RuboCop::Cop::Rails::RenderInline
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Rails::RenderInline
- Defined in:
- lib/rubocop/cop/rails/render_inline.rb
Overview
Looks for inline rendering within controller actions.
Constant Summary collapse
- MSG =
'Prefer using a template over inline rendering.'
- RESTRICT_ON_SEND =
%i[render].freeze
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
35 36 37 |
# File 'lib/rubocop/cop/rails/render_inline.rb', line 35 def on_send(node) add_offense(node) if render_with_inline_option?(node) end |