diff options
Diffstat (limited to 'actionpack/lib/action_view')
10 files changed, 23 insertions, 23 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 48df26efaa..7293145964 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -427,7 +427,7 @@ module ActionView # accepts_nested_attributes_for :address, :allow_destroy => true # end # - # Now, when you use a form element with the <tt>_delete</tt> parameter, + # Now, when you use a form element with the <tt>_destroy</tt> parameter, # with a value that evaluates to +true+, you will destroy the associated # model (eg. 1, '1', true, or 'true'): # @@ -435,7 +435,7 @@ module ActionView # ... # <% person_form.fields_for :address do |address_fields| %> # ... - # Delete: <%= address_fields.check_box :_delete %> + # Delete: <%= address_fields.check_box :_destroy %> # <% end %> # <% end %> # @@ -508,14 +508,14 @@ module ActionView # end # # This will allow you to specify which models to destroy in the - # attributes hash by adding a form element for the <tt>_delete</tt> + # attributes hash by adding a form element for the <tt>_destroy</tt> # parameter with a value that evaluates to +true+ # (eg. 1, '1', true, or 'true'): # # <% form_for @person, :url => { :action => "update" } do |person_form| %> # ... # <% person_form.fields_for :projects do |project_fields| %> - # Delete: <%= project_fields.check_box :_delete %> + # Delete: <%= project_fields.check_box :_destroy %> # <% end %> # <% end %> def fields_for(record_or_name_or_array, *args, &block) diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index 7039ecd233..4c523d4b20 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -151,7 +151,7 @@ module ActionView # end # # Sample usage (selecting the associated Author for an instance of Post, <tt>@post</tt>): - # collection_select(:post, :author_id, Author.all, :id, :name_with_initial, {:prompt => true}) + # collection_select(:post, :author_id, Author.all, :id, :name_with_initial, :prompt => true) # # If <tt>@post.author_id</tt> is already <tt>1</tt>, this would return: # <select name="post[author_id]"> diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index 573733ffea..07694f5ebb 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -37,12 +37,12 @@ module ActionView # form_tag('/upload', :multipart => true) # # => <form action="/upload" method="post" enctype="multipart/form-data"> # - # <% form_tag('/posts')do -%> + # <%= form_tag('/posts')do -%> # <div><%= submit_tag 'Save' %></div> # <% end -%> # # => <form action="/posts" method="post"><div><input type="submit" name="submit" value="Save" /></div></form> # - # <% form_tag('/posts', :remote => true) %> + # <%= form_tag('/posts', :remote => true) %> # # => <form action="/posts" method="post" data-remote="true"> # def form_tag(url_for_options = {}, options = {}, *parameters_for_url, &block) @@ -430,17 +430,17 @@ module ActionView # <tt>options</tt> accept the same values as tag. # # ==== Examples - # <% field_set_tag do %> + # <%= field_set_tag do %> # <p><%= text_field_tag 'name' %></p> # <% end %> # # => <fieldset><p><input id="name" name="name" type="text" /></p></fieldset> # - # <% field_set_tag 'Your details' do %> + # <%= field_set_tag 'Your details' do %> # <p><%= text_field_tag 'name' %></p> # <% end %> # # => <fieldset><legend>Your details</legend><p><input id="name" name="name" type="text" /></p></fieldset> # - # <% field_set_tag nil, :class => 'format' do %> + # <%= field_set_tag nil, :class => 'format' do %> # <p><%= text_field_tag 'name' %></p> # <% end %> # # => <fieldset class="format"><p><input id="name" name="name" type="text" /></p></fieldset> diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 8dab3094dd..07eee3b399 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -71,7 +71,7 @@ module ActionView # # Instead of passing the content as an argument, you can also use a block # in which case, you pass your +html_options+ as the first parameter. - # <% javascript_tag :defer => 'defer' do -%> + # <%= javascript_tag :defer => 'defer' do -%> # alert('All is good') # <% end -%> def javascript_tag(content_or_options_with_block = nil, html_options = {}, &block) diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index be49b5cc28..4d6ea7dfb2 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -35,7 +35,7 @@ module ActionView # # ...through a form... # - # <% form_remote_tag :url => '/shipping' do -%> + # <%= form_remote_tag :url => '/shipping' do -%> # <div><%= submit_tag 'Recalculate Shipping' %></div> # <% end -%> # diff --git a/actionpack/lib/action_view/helpers/record_tag_helper.rb b/actionpack/lib/action_view/helpers/record_tag_helper.rb index 31411dc08a..a9cf15f418 100644 --- a/actionpack/lib/action_view/helpers/record_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/record_tag_helper.rb @@ -4,7 +4,7 @@ module ActionView # Produces a wrapper DIV element with id and class parameters that # relate to the specified Active Record object. Usage example: # - # <% div_for(@person, :class => "foo") do %> + # <%= div_for(@person, :class => "foo") do %> # <%=h @person.name %> # <% end %> # @@ -19,7 +19,7 @@ module ActionView # content_tag_for creates an HTML element with id and class parameters # that relate to the specified Active Record object. For example: # - # <% content_tag_for(:tr, @person) do %> + # <%= content_tag_for(:tr, @person) do %> # <td><%=h @person.first_name %></td> # <td><%=h @person.last_name %></td> # <% end %> @@ -31,7 +31,7 @@ module ActionView # # If you require the HTML id attribute to have a prefix, you can specify it: # - # <% content_tag_for(:tr, @person, :foo) do %> ... + # <%= content_tag_for(:tr, @person, :foo) do %> ... # # produces: # @@ -41,7 +41,7 @@ module ActionView # additional HTML attributes. If you specify a <tt>:class</tt> value, it will be combined # with the default class name for your object. For example: # - # <% content_tag_for(:li, @person, :class => "bar") %>... + # <%= content_tag_for(:li, @person, :class => "bar") %>... # # produces: # diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb index d9d2588a2a..8ae2e5f28f 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionpack/lib/action_view/helpers/tag_helper.rb @@ -65,7 +65,7 @@ module ActionView # content_tag("select", options, :multiple => true) # # => <select multiple="multiple">...options...</select> # - # <% content_tag :div, :class => "strong" do -%> + # <%= content_tag :div, :class => "strong" do -%> # Hello world! # <% end -%> # # => <div class="strong">Hello world!</div> diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index b19a9754f4..e1ce65f90a 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -17,7 +17,7 @@ module ActionView # concat "hello" # # is the equivalent of <%= "hello" %> # - # if (logged_in == true): + # if logged_in # concat "Logged in!" # else # concat link_to('login', :action => login) @@ -415,7 +415,7 @@ module ActionView # {:first => 'Emily', :middle => 'Shannon', :maiden => 'Pike', :last => 'Hicks'}, # {:first => 'June', :middle => 'Dae', :last => 'Jones'}] # <% @items.each do |item| %> - # <tr class="<%= cycle("even", "odd", :name => "row_class") -%>"> + # <tr class="<%= cycle("odd", "even", :name => "row_class") -%>"> # <td> # <% item.values.each do |value| %> # <%# Create a named cycle "colors" %> diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 148f2868e9..ae1385f3b7 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -162,7 +162,7 @@ module ActionView # # You can use a block as well if your link target is hard to fit into the name parameter. ERb example: # - # <% link_to(@profile) do %> + # <%= link_to(@profile) do %> # <strong><%= @profile.name %></strong> -- <span>Check it out!</span> # <% end %> # # => <a href="/profiles/1"> diff --git a/actionpack/lib/action_view/render/partials.rb b/actionpack/lib/action_view/render/partials.rb index 950c9d2cd8..d34ab0354c 100644 --- a/actionpack/lib/action_view/render/partials.rb +++ b/actionpack/lib/action_view/render/partials.rb @@ -123,7 +123,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 %> + # <%= render(:layout => "administrator", :locals => { :user => chief }) do %> # Title: <%= chief.title %> # <% end %> # @@ -146,7 +146,7 @@ module ActionView # </div> # # <%# app/views/users/index.html.erb &> - # <% render :layout => @users do |user| %> + # <%= render :layout => @users do |user| %> # Title: <%= user.title %> # <% end %> # @@ -162,7 +162,7 @@ module ActionView # </div> # # <%# app/views/users/index.html.erb &> - # <% render :layout => @users do |user, section| %> + # <%= render :layout => @users do |user, section| %> # <%- case section when :header -%> # Title: <%= user.title %> # <%- when :footer -%> |