By convention, any partials that are loaded by "application.html.erb"
are loaded by all controllers in the application. That being the
case, when rendering app->messages->index:
The app...erb line will read "<%= render :partial => 'layouts/
The partial will be found in views/layouts/
When the line in app...erb is reached that reads "<%= yield %>"
The file "views/messages/index.html.erb" is rendered
And you have a file views/layouts/application.html.erb
that calls "<%= render :partial => 'navbar_tabs' %>"
Rails will look for the partial named: views/messages/
It is customary practice to follow the convention "... :partial =>
'directory/partial' %>" just so there is no confusion. Thus, if you
had additional message related tabs, you would include in views/
messages/index.html.erb: <%= render :partial => 'messages/