提交 acc8e259 编写于 作者: Ł Łukasz Strzałkowski

Move render_test to AV

上级 aa2d0038
此差异已折叠。
<%= greeting %> bad customer: <%= bad_customer.name %><%= bad_customer_counter %>
\ No newline at end of file
<%= greeting %>: <%= customer.name %>
\ No newline at end of file
Living in a nested world
\ No newline at end of file
<%= greeting %> good customer: <%= good_customer.name %><%= good_customer_counter %>
\ No newline at end of file
Hello world!
\ No newline at end of file
<title><%= yield Struct.new(:name).new("David") %></title>
\ No newline at end of file
<%= render(:layout => "layout_for_partial", :locals => { :name => "Anthony" }) do %>Inside from first block in layout<% "Return value should be discarded" %><% end %>
<%= yield %>
<%= render(:layout => "layout_for_partial", :locals => { :name => "Ramm" }) do %>Inside from second block in layout<% end %>
xml.wrapper do
xml << yield
end
\ No newline at end of file
<%= render( :layout => "layout_for_partial", :partial => "partial_for_use_in_layout", :locals => {:name => 'Anthony' } ) %>
<%= yield %>
<%= render( :layout => "layout_for_partial", :partial => "partial_for_use_in_layout", :locals => {:name => 'Ramm' } ) %>
\ No newline at end of file
<html><%= yield %><%= @variable_for_layout %></html>
\ No newline at end of file
<title><%= @title || yield(:title) %></title>
<%= yield -%>
\ No newline at end of file
<%= render :partial => "partial_only_html" %><%= yield %>
XHR!
<%= yield %>
\ No newline at end of file
<title><%= yield :title %></title>
<%= yield %>
<%= counter_counter %>
\ No newline at end of file
Hello: <%= customer.name rescue "Anonymous" %>
\ No newline at end of file
<%= customer_counter.name %><%= customer_counter_counter %>
\ No newline at end of file
<%= client.name %><%= client_counter %>
\ No newline at end of file
<%= greeting %>: <%= customer_greeting.name %>
\ No newline at end of file
<%= customer.name %> <%= customer.name %> <%= customer.name %>
\ No newline at end of file
<%= render :partial => "test/second_json_partial" %>
\ No newline at end of file
<%= greeting %>: <%= hash_greeting[:first_name] %>
\ No newline at end of file
<%= hash_object[:first_name] %>
<%= hash_object[:first_name].reverse %>
Before (<%= name %>)
<%= yield %>
After
\ No newline at end of file
Inside from partial (<%= name %>)
\ No newline at end of file
<%= render 'test/partial' %>
partial with partial
Second: <%= name %>
Third: <%= @name %>
<p>First paragraph</p>
<p>Second paragraph</p>
<p>Third paragraph</p>
<p>Fourth paragraph</p>
<p>Fifth paragraph</p>
<p>Sixth paragraph</p>
<p>Seventh paragraph</p>
<p>Eight paragraph</p>
<p>Ninth paragraph</p>
<p>Tenth paragraph</p>
<%= raise "error here!" %>
<p>Eleventh paragraph</p>
<p>Twelfth paragraph</p>
\ No newline at end of file
<% @title = "Talking to the layout" -%>
Action was here!
\ No newline at end of file
<%= render(:layout => "layout_for_partial", :partial => "partial_for_use_in_layout", :locals => { :name => "David" }) %>
\ No newline at end of file
<% days = capture do %>
Dreamy days
<% end %>
<%= days %>
\ No newline at end of file
<%= render :partial => "test/json_change_priority", formats: :json %>
HTML Template, but <%= render :partial => "test/changing_priority" %> partial
\ No newline at end of file
<% content_for :title do -%>Putting stuff in the title!<% end -%>Great stuff!
\ No newline at end of file
<% content_for :title, "Putting stuff "
content_for :title, "in the title!" -%>
Great stuff!
\ No newline at end of file
<% content_for :title, "Putting stuff in the title!" -%>
Great stuff!
\ No newline at end of file
<test>passed formatted html erb</test>
\ No newline at end of file
<test>passed formatted xml erb</test>
\ No newline at end of file
xml.html do
xml.p "Hello #{@name}"
xml << render(:file => "test/greeting")
end
\ No newline at end of file
xml.test do
render :partial => 'hello', :locals => { :xm => xml }
end
\ No newline at end of file
xml.html do
xml.head do
xml.title "Hello World"
end
xml.body do
xml.p "abes"
xml.p "monks"
xml.p "wiseguys"
end
end
\ No newline at end of file
<%= render :partial => "test/first_json_partial", formats: :json %>
\ No newline at end of file
<%= @test_unchanged = 'goodbye' %><%= render :partial => 'customer', :collection => @customers %><%= @test_unchanged %>
content_for :title do
'Putting stuff in the title!'
end
xml << "Great stuff!"
First: <%= @name %>
<%= render :partial => "person", :locals => { :name => "Stephan" } -%>
Fourth: <%= @name %>
Fifth: <%= name %>
\ No newline at end of file
<%= render :file => @path %>
\ No newline at end of file
<%= render partial: 'test/_directory/partial_with_locales', locals: {'name' => 'Jane'} %>
<%= render :partial => 'partial', :locals => {'first' => '1'} %>
<%= render :partial => 'partial', :locals => {'second' => '2'} %>
<%= render(:layout => "layout_for_partial", :locals => { :name => "David" }) do %>Inside from block<% end %>
\ No newline at end of file
<strong><%= render :partial => "partial_only_html" %></strong>
<strong><%= render :partial => "partial_only" %></strong>
<%= render :template => "test/greeting", :formats => :xml %>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册