diff --git a/actionpack/lib/action_view/helpers/capture_helper.rb b/actionpack/lib/action_view/helpers/capture_helper.rb index 8a74ed04b268dd413188c90d3f62280400ede71d..80bff8a4cd309fa0ab2c42d22937c8f50fdd6ca2 100644 --- a/actionpack/lib/action_view/helpers/capture_helper.rb +++ b/actionpack/lib/action_view/helpers/capture_helper.rb @@ -61,7 +61,7 @@ def capture(*args, &block) # # You can also use this syntax alongside an existing call to yield in a layout. For example: # - # + # <%# This is the layout %> # # # My Website @@ -75,7 +75,7 @@ def capture(*args, &block) # And now, we'll create a view that has a content_for call that # creates the script identifier. # - # + # <%# This is our view %> # Please login! # # <% content_for :script do %> @@ -100,7 +100,7 @@ def capture(*args, &block) #
  • <%= link_to 'Home', :action => 'index' %>
  • # <% end %> # - # + # <%# Add some other content, or use a different template: %> # # <% content_for :navigation do %> #
  • <%= link_to 'Login', :action => 'login' %>
  • diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb index 8fb4c3a7276ac48d3ed9a1e89aab0dbf793bb47b..5988083091996ee1050d03cb84b8004a59a3c272 100644 --- a/actionpack/lib/action_view/partials.rb +++ b/actionpack/lib/action_view/partials.rb @@ -50,23 +50,23 @@ module ActionView # Partials can have their own layouts applied to them. These layouts are different than the ones that are specified globally # for the entire action, but they work in a similar fashion. Imagine a list with two types of users: # - # + # <%# app/views/users/index.html.erb &> # Here's the administrator: # <%= render :partial => "user", :layout => "administrator", :locals => { :user => administrator } %> # # Here's the editor: # <%= render :partial => "user", :layout => "editor", :locals => { :user => editor } %> # - # + # <%# app/views/users/_user.html.erb &> # Name: <%= user.name %> # - # + # <%# app/views/users/_administrator.html.erb &> #
    # Budget: $<%= user.budget %> # <%= yield %> #
    # - # + # <%# app/views/users/_editor.html.erb &> #
    # Deadline: $<%= user.deadline %> # <%= yield %> @@ -88,7 +88,7 @@ module ActionView # # You can also apply a layout to a block within any template: # - # + # <%# app/views/users/_chief.html.erb &> # <% render(:layout => "administrator", :locals => { :user => chief }) do %> # Title: <%= chief.title %> # <% end %>