Преглед изворни кода

[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