Activity

  Dennis Hackethal posted criticism #5839.

Calling render with options only, such as render status: :not_found or render layout: 'admin', skips the action's helper method and looks for an ERB template instead. Without one, it raises ActionView::MissingTemplate:

ruby
class ProductsController < ApplicationController
def show
render status: :not_found # MissingTemplate, though ProductsHelper#show exists
end
end

Naming the action works around it: render :show, status: :not_found.