Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>The PagesController becomes a StaticPagesController</p> </blockquote> <p>There is no reason. PagesController is fine. He did that maybe for clarity reason (?).</p> <blockquote> <p>@Title is not anymore initialised in the controller, but in each page</p> </blockquote> <p>This is for best practice/convention reason. Please take a look at the answer on this question <a href="https://stackoverflow.com/questions/8590406/where-does-the-meta-content-live-in-the-mvc/8593728#8593728">Where does the meta content live in the MVC?</a></p> <blockquote> <p>The @Title variable is initialised through "provide" function, and used through "yield" function instead of simply inserting &lt;%= @title %></p> </blockquote> <p>Same answer as above.</p> <p>Some people think that meta content such as title belongs to the view and thus should be set in the view, not in the controller.</p> <p>The practical differences between <code>provide</code> and <code>content_for</code> are well explained here: <a href="http://api.rubyonrails.org/classes/ActionController/Streaming.html#module-ActionController::Streaming-label-Communication+between+layout+and+template" rel="nofollow noreferrer">http://api.rubyonrails.org/classes/ActionController/Streaming.html#module-ActionController::Streaming-label-Communication+between+layout+and+template</a></p> <p>Please note that these changes are not specific to Rails 3.2 (except for <code>provide</code> that was introduce with <code>stream</code> in Rails 3.1).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload