I am learning Ruby on Rails from a book by Michael Hartle. I really like this letter, structured and understandable. However, I have a question about section 3.3 differences between Rails 3.0 and Rails 3.2:
PagesController becomes StaticPagesController@Title no longer initialized in the controller, but on every page- The variable is
@Titleinitialized using the "provide" function and is used through the "yield" function instead of simply pasting<%= @title %>
Is it for learning reasons, or is it an updated best practice for developing RoR?
source
share