Commit Graph

10 Commits

Author SHA1 Message Date
Jeremy Kemper a6f49d9b78 Introduce ActionController::Base.rescue_from to declare exception-handling methods. Cleaner style than the case-heavy rescue_action_in_public. Closes #9449.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7597 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 21:56:22 +00:00
Michael Koziarski d4d4a08f6b Make sure missing template exceptions actually say which template they were looking for. Closes #8683 [dasil003]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-07-11 23:32:02 +00:00
Jeremy Kemper dcaa074abf Routing: respond with 405 Method Not Allowed status when the route path matches but the HTTP method does not. Closes #6953.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-26 20:07:34 +00:00
David Heinemeier Hansson e105653066 Added .erb and .builder as preferred aliases to the now deprecated .rhtml and .rxml extensions [Chad Fowler]. This is done to separate the renderer from the mime type. .erb templates are often used to render emails, atom, csv, whatever. So labeling them .rhtml doesn't make too much sense. The same goes for .rxml, which can be used to build everything from HTML to Atom to whatever. .rhtml and .rxml will continue to work until Rails 3.0, though. So this is a slow phasing out. All generators and examples will start using the new aliases, though.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-20 22:09:12 +00:00
Jeremy Kemper d38417fc02 RecordInvalid, RecordNotSaved => 422 Unprocessable Entity, StaleObjectError => 409 Conflict. References #7097.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5966 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-17 00:43:53 +00:00
Jeremy Kemper a6e12c0c21 Wrap and skip tests using mocha.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5926 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-14 12:49:55 +00:00
Jeremy Kemper ba814a9033 Use mocha for rescue tests.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5916 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-13 07:14:46 +00:00
Jeremy Kemper a1ca37ec86 Use 400 Bad Request status for unrescued ActiveRecord::RecordInvalid exceptions.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-22 00:27:39 +00:00
Jeremy Kemper a454dcf012 Unrescued ActiveRecord::RecordNotFound responds with 404 instead of 500.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-08 22:19:00 +00:00
Jeremy Kemper f0753992ab test controller rescues
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5504 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-13 02:03:50 +00:00