浏览代码

[rails] Render fortune explicit (#9485)

This should be slightly faster than deducing how to render.
Petrik de Heus 7 月之前
父节点
当前提交
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