소스 검색

[rails] Render fortune explicit (#9485)

This should be slightly faster than deducing how to render.
Petrik de Heus 8 달 전
부모
커밋
30f48766c2
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      frameworks/Ruby/rails/app/controllers/hello_world_controller.rb

+ 1 - 0
frameworks/Ruby/rails/app/controllers/hello_world_controller.rb

@@ -30,6 +30,7 @@ class HelloWorldController < ApplicationController
     @fortunes = Fortune.all.to_a
     @fortunes << Fortune.new(id: 0, message: 'Additional fortune added at request time.')
     @fortunes.sort_by!(&:message)
+    render :fortune
   end
 
   def update