aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/base.rb
diff options
context:
space:
mode:
authorRizwan Reza <rizwanreza@gmail.com>2010-06-16 22:47:49 +0430
committerRizwan Reza <rizwanreza@gmail.com>2010-06-16 22:47:49 +0430
commit5a0bc2c7bc993e8f987a99f510b7d1d2cc7cf8ba (patch)
treef340714b1c19fea9a0745e6eb373d1147c0a27e2 /actionpack/lib/action_view/base.rb
parentfde95048475c1ffc89978650411b2e9034ff6a35 (diff)
downloadrails-5a0bc2c7bc993e8f987a99f510b7d1d2cc7cf8ba.tar.gz
rails-5a0bc2c7bc993e8f987a99f510b7d1d2cc7cf8ba.tar.bz2
rails-5a0bc2c7bc993e8f987a99f510b7d1d2cc7cf8ba.zip
Adds title and description where needed.
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r--actionpack/lib/action_view/base.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 4d06ca0d89..a7ba9f374a 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -8,11 +8,13 @@ module ActionView #:nodoc:
class NonConcattingString < ActiveSupport::SafeBuffer
end
+ # = Action View Base
+ #
# Action View templates can be written in three ways. If the template file has a <tt>.erb</tt> (or <tt>.rhtml</tt>) extension then it uses a mixture of ERb
# (included in Ruby) and HTML. If the template file has a <tt>.builder</tt> (or <tt>.rxml</tt>) extension then Jim Weirich's Builder::XmlMarkup library is used.
# If the template file has a <tt>.rjs</tt> extension then it will use ActionView::Helpers::PrototypeHelper::JavaScriptGenerator.
#
- # = ERb
+ # == ERb
#
# You trigger ERb by using embeddings such as <% %>, <% -%>, and <%= %>. The <%= %> tag set is used when you want output. Consider the
# following loop for names:
@@ -32,7 +34,7 @@ module ActionView #:nodoc:
#
# <%- and -%> suppress leading and trailing whitespace, including the trailing newline, and can be used interchangeably with <% and %>.
#
- # == Using sub templates
+ # === Using sub templates
#
# Using sub templates allows you to sidestep tedious replication and extract common display structures in shared templates. The
# classic example is the use of a header and footer (even though the Action Pack-way would be to use Layouts):
@@ -54,7 +56,7 @@ module ActionView #:nodoc:
#
# <title><%= @page_title %></title>
#
- # == Passing local variables to sub templates
+ # === Passing local variables to sub templates
#
# You can pass local variables to sub templates by using a hash with the variable names as keys and the objects as values:
#
@@ -74,7 +76,7 @@ module ActionView #:nodoc:
#
# Testing using <tt>defined? headline</tt> will not work. This is an implementation restriction.
#
- # == Template caching
+ # === Template caching
#
# By default, Rails will compile each template to a method in order to render it. When you alter a template, Rails will
# check the file's modification time and recompile it.