[Solved] Rails what does this “yield” do?


The reserved Ruby key word yield is for processing closures (like a Proc or lamda). That said it is some kind of placeholder for processing some logic.
In Ruby on Rails view templating it is used for merging in partials. In the case of a layout file like the application.html.erb it merges in controller response templates like index.html.erb or show.html.erb.
Think of it as a placeholder for your controller response HTML in a global layout environment.


Read more at: Understanding yield
or about Ruby closures:
Do the Proc! … a Ruby closure and
Have a lambda! … a Ruby closure

solved Rails what does this “yield” do?