Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Apply the rest of Chads patch
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
- Loading branch information
Showing
144 changed files
with
841 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
first mail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
first mail | ||
1 change: 1 addition & 0 deletions
1
actionmailer/test/fixtures/helper_mailer/use_example_helper.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
So, <%= example_format(@text) %> |
1 change: 0 additions & 1 deletion
1
actionmailer/test/fixtures/helper_mailer/use_example_helper.rhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
So, <%= example_format(@text) %> | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello, <%= person_name %>. Thanks for registering! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
Hello, <%= person_name %>. Thanks for registering! | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This message brought to you by <%= name_of_the_mailer_class %>. |
1 change: 0 additions & 1 deletion
1
actionmailer/test/fixtures/helper_mailer/use_helper_method.rhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
This message brought to you by <%= name_of_the_mailer_class %>. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
From "Romeo and Juliet": | ||
|
||
<%= block_format @text %> | ||
|
||
Good ol' Shakespeare. |
5 changes: 0 additions & 5 deletions
5
actionmailer/test/fixtures/helper_mailer/use_mail_helper.rhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +0,0 @@ | ||
From "Romeo and Juliet": | ||
|
||
<%= block_format @text %> | ||
|
||
Good ol' Shakespeare. | ||
1 change: 1 addition & 0 deletions
1
...test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Have a lovely picture, from me. Enjoy! |
1 change: 0 additions & 1 deletion
1
...st/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.rhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
Have a lovely picture, from me. Enjoy! | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
second mail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
second mail | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Hello there, | ||
|
||
Mr. <%= @recipient %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
Hello there, | ||
|
||
Mr. <%= @recipient %> | ||
1 change: 1 addition & 0 deletions
1
actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Ignored when searching for implicitly multipart parts. |
1 change: 0 additions & 1 deletion
1
actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.ignored.rhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
Ignored when searching for implicitly multipart parts. | ||
10 changes: 10 additions & 0 deletions
10
actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<html> | ||
<body> | ||
HTML formatted message to <strong><%= @recipient %></strong>. | ||
</body> | ||
</html> | ||
<html> | ||
<body> | ||
HTML formatted message to <strong><%= @recipient %></strong>. | ||
</body> | ||
</html> |
10 changes: 0 additions & 10 deletions
10
actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.rhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +0,0 @@ | ||
<html> | ||
<body> | ||
HTML formatted message to <strong><%= @recipient %></strong>. | ||
</body> | ||
</html> | ||
<html> | ||
<body> | ||
HTML formatted message to <strong><%= @recipient %></strong>. | ||
</body> | ||
</html> | ||
2 changes: 2 additions & 0 deletions
2
actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Plain text to <%= @recipient %>. | ||
Plain text to <%= @recipient %>. |
2 changes: 0 additions & 2 deletions
2
actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.rhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +0,0 @@ | ||
Plain text to <%= @recipient %>. | ||
Plain text to <%= @recipient %>. | ||
1 change: 1 addition & 0 deletions
1
actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
yaml to: <%= @recipient %> |
1 change: 0 additions & 1 deletion
1
actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.rhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +0,0 @@ | ||
yaml to: <%= @recipient %> | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Hello there, | ||
|
||
Mr. <%= @recipient %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
Hello there, | ||
|
||
Mr. <%= @recipient %> | ||
3 changes: 3 additions & 0 deletions
3
actionmailer/test/fixtures/test_mailer/signed_up_with_url.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Hello there, | ||
|
||
Mr. <%= @recipient %>. Please see our greeting at <%= @welcome_url %> |
3 changes: 0 additions & 3 deletions
3
actionmailer/test/fixtures/test_mailer/signed_up_with_url.rhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
Hello there, | ||
|
||
Mr. <%= @recipient %>. Please see our greeting at <%= @welcome_url %> | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<h1>Address Book</h1> | ||
|
||
<% if @people.empty? %> | ||
<p>No people in the address book yet</p> | ||
<% else %> | ||
<table> | ||
<tr><th>Name</th><th>Email Address</th><th>Phone Number</th></tr> | ||
<% for person in @people %> | ||
<tr><td><%= person.name %></td><td><%= person.email_address %></td><td><%= person.phone_number %></td></tr> | ||
<% end %> | ||
</table> | ||
<% end %> | ||
|
||
<form action="create_person"> | ||
<p> | ||
Name:<br /> | ||
<input type="text" name="person[name]"> | ||
</p> | ||
|
||
<p> | ||
Email address:<br /> | ||
<input type="text" name="person[email_address]"> | ||
</p> | ||
|
||
<p> | ||
Phone number:<br /> | ||
<input type="text" name="person[phone_number]"> | ||
</p> | ||
|
||
<p> | ||
<input type="submit" value="Create Person"> | ||
</p> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<html> | ||
<head> | ||
<title><%= @title || "Untitled" %></title> | ||
</head> | ||
<body> | ||
<%= @content_for_layout %> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<html> | ||
<body> | ||
<h1>Topics</h1> | ||
|
||
<%= link_to "New topic", :action => "new_topic" %> | ||
|
||
<ul> | ||
<% for topic in @topics %> | ||
<li><%= link_to "#{topic.title} (#{topic.replies.length} replies)", :action => "topic", :path_params => { "id" => topic.id } %></li> | ||
<% end %> | ||
</ul> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<html> | ||
<body> | ||
<h1>New topic</h1> | ||
|
||
<form action="<%= url_for(:action => "create_topic") %>" method="post"> | ||
<p> | ||
Title:<br> | ||
<input type="text" name="topic[title]"> | ||
</p> | ||
|
||
<p> | ||
Body:<br> | ||
<textarea name="topic[body]" style="width: 200px; height: 200px"></textarea> | ||
</p> | ||
|
||
<p> | ||
<input type="submit" value="Create topic"> | ||
</p> | ||
</form> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<html> | ||
<body> | ||
<h1><%= @topic.title %></h1> | ||
|
||
<p><%= @topic.body %></p> | ||
|
||
<%= link_to "Back to topics", :action => "index" %> | ||
<% unless @topic.replies.empty? %> | ||
<h2>Replies</h2> | ||
<ol> | ||
<% for reply in @topic.replies %> | ||
<li><%= reply.body %></li> | ||
<% end %> | ||
</ol> | ||
<% end %> | ||
|
||
<h2>Reply to this topic</h2> | ||
|
||
<form action="<%= url_for(:action => "create_reply") %>" method="post"> | ||
<input type="hidden" name="reply[topic_id]" value="<%= @topic.id %>"> | ||
<p> | ||
<textarea name="reply[body]" style="width: 200px; height: 200px"></textarea> | ||
</p> | ||
|
||
<p> | ||
<input type="submit" value="Create reply"> | ||
</p> | ||
</form> | ||
|
||
</body> | ||
</html> |
44 changes: 44 additions & 0 deletions
44
actionpack/lib/action_controller/templates/rescues/_request_and_response.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<% unless @exception.blamed_files.blank? %> | ||
<% if (hide = @exception.blamed_files.length > 8) %> | ||
<a href="#" onclick="document.getElementById('blame_trace').style.display='block'; return false;">Show blamed files</a> | ||
<% end %> | ||
<pre id="blame_trace" <%='style="display:none"' if hide %>><code><%=h @exception.describe_blame %></code></pre> | ||
<% end %> | ||
<% if false %> | ||
<br /><br /> | ||
<% begin %> | ||
<%= form_tag(request.request_uri, "method" => request.method) %> | ||
<input type="hidden" name="BP-RETRY" value="1" /> | ||
|
||
<% for key, values in params %> | ||
<% next if key == "BP-RETRY" %> | ||
<% for value in Array(values) %> | ||
<input type="hidden" name="<%= key %>" value="<%= value %>" /> | ||
<% end %> | ||
<% end %> | ||
|
||
<input type="submit" value="Retry with Breakpoint" /> | ||
</form> | ||
<% rescue Exception => e %> | ||
<%=h "Couldn't render breakpoint link due to #{e.class} #{e.message}" %> | ||
<% end %> | ||
<% end %> | ||
<% | ||
clean_params = request.parameters.clone | ||
clean_params.delete("action") | ||
clean_params.delete("controller") | ||
|
||
request_dump = clean_params.empty? ? 'None' : clean_params.inspect.gsub(',', ",\n") | ||
%> | ||
|
||
<h2 style="margin-top: 30px">Request</h2> | ||
<p><b>Parameters</b>: <pre><%=h request_dump %></pre></p> | ||
|
||
<p><a href="#" onclick="document.getElementById('session_dump').style.display='block'; return false;">Show session dump</a></p> | ||
<div id="session_dump" style="display:none"><%= debug(request.session.instance_variable_get("@data")) %></div> | ||
|
||
|
||
<h2 style="margin-top: 30px">Response</h2> | ||
<p><b>Headers</b>: <pre><%=h response ? response.headers.inspect.gsub(',', ",\n") : 'None' %></pre></p> |
26 changes: 26 additions & 0 deletions
26
actionpack/lib/action_controller/templates/rescues/_trace.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<% | ||
traces = [ | ||
["Application Trace", @exception.application_backtrace], | ||
["Framework Trace", @exception.framework_backtrace], | ||
["Full Trace", @exception.clean_backtrace] | ||
] | ||
names = traces.collect {|name, trace| name} | ||
%> | ||
|
||
<p><code>RAILS_ROOT: <%= defined?(RAILS_ROOT) ? RAILS_ROOT : "unset" %></code></p> | ||
|
||
<div id="traces"> | ||
<% names.each do |name| -%> | ||
<% | ||
show = "document.getElementById('#{name.gsub /\s/, '-'}').style.display='block';" | ||
hide = (names - [name]).collect {|hide_name| "document.getElementById('#{hide_name.gsub /\s/, '-'}').style.display='none';"} | ||
%> | ||
<a href="#" onclick="<%= hide %><%= show %>; return false;"><%= name %></a> <%= '|' unless names.last == name %> | ||
<% end -%> | ||
<% traces.each do |name, trace| -%> | ||
<div id="<%= name.gsub /\s/, '-' %>" style="display: <%= name == "Application Trace" ? 'block' : 'none' %>;"> | ||
<pre><code><%= trace.join "\n" %></code></pre> | ||
</div> | ||
<% end -%> | ||
</div> |
11 changes: 11 additions & 0 deletions
11
actionpack/lib/action_controller/templates/rescues/diagnostics.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<h1> | ||
<%=h @exception.class.to_s %> | ||
<% if request.parameters['controller'] %> | ||
in <%=h request.parameters['controller'].humanize %>Controller<% if request.parameters['action'] %>#<%=h request.parameters['action'] %><% end %> | ||
<% end %> | ||
</h1> | ||
<pre><%=h @exception.clean_message %></pre> | ||
|
||
<%= render_file(@rescues_path + "/_trace.erb", false) %> | ||
<%= render_file(@rescues_path + "/_request_and_response.erb", false) %> |
29 changes: 29 additions & 0 deletions
29
actionpack/lib/action_controller/templates/rescues/layout.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<html> | ||
<head> | ||
<title>Action Controller: Exception caught</title> | ||
<style> | ||
body { background-color: #fff; color: #333; } | ||
|
||
body, p, ol, ul, td { | ||
font-family: verdana, arial, helvetica, sans-serif; | ||
font-size: 13px; | ||
line-height: 18px; | ||
} | ||
|
||
pre { | ||
background-color: #eee; | ||
padding: 10px; | ||
font-size: 11px; | ||
} | ||
|
||
a { color: #000; } | ||
a:visited { color: #666; } | ||
a:hover { color: #fff; background-color:#000; } | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<%= @contents %> | ||
|
||
</body> | ||
</html> |
2 changes: 2 additions & 0 deletions
2
actionpack/lib/action_controller/templates/rescues/missing_template.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Template is missing</h1> | ||
<p><%=h @exception.message %></p> |
Oops, something went wrong.