Added a default 422.html page to be rendered when ActiveRecord::RecordInvalid,...

Added a default 422.html page to be rendered when ActiveRecord::RecordInvalid, ActiveRecord::RecordNotSaved, or ActionController::InvalidToken is raised [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 dfcb5af2
*SVN*
* Added a default 422.html page to be rendered when ActiveRecord::RecordInvalid, ActiveRecord::RecordNotSaved, or ActionController::InvalidToken is raised [DHH]
* Added --skip-fixture option to script/generate model #6862 [sandofsky]
* Print Rails version when starting console #7440 [eyematz]
......
......@@ -66,7 +66,7 @@ PUBLIC_DIRS = %w( images javascripts stylesheets )
TEST_DIRS = %w( fixtures unit functional mocks mocks/development mocks/test )
LOG_FILES = %w( server.log development.log test.log production.log )
HTML_FILES = %w( 404.html 500.html index.html robots.txt favicon.ico images/rails.png
HTML_FILES = %w( 422.html 404.html 500.html index.html robots.txt favicon.ico images/rails.png
javascripts/prototype.js javascripts/application.js
javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js )
BIN_FILES = %w( about console destroy generate performance/benchmarker performance/profiler process/reaper process/spawner process/inspector runner server plugin )
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>The change you wanted was rejected (422)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
</style>
</head>
<body>
<!-- This file lives in public/422.html -->
<div class="dialog">
<h1>The change you wanted was rejected.</h1>
<p>Maybe you tried to change something you didn't have access to.</p>
</div>
</body>
</html>
\ No newline at end of file
......@@ -5,7 +5,7 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>We're sorry, but something went wrong</title>
<title>We're sorry, but something went wrong (500)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册