Commit Graph

6509 Commits

Author SHA1 Message Date
José Valim
76a3ec7f6e Try to play nice with plugins doing monkey patches. 2011-12-02 09:57:43 +01:00
José Valim
07f90f6bec Merge branch 'exceptions' with the following features:
* A Railtie API for registering new exceptions and their respective status code (check Active Record railtie for an example)

* Extraction of ShowExceptions middleware logging and debugging features into a middleware called DebugExceptions

Conflicts:
	actionpack/CHANGELOG.md
2011-12-01 21:18:47 +01:00
José Valim
f9edc079e0 Split and improve show and debug exceptions middlewares. 2011-12-01 21:15:42 +01:00
José Valim
750bb5c865 Split ShowExceptions responsibilities in two middlewares. 2011-12-01 20:46:18 +01:00
David Heinemeier Hansson
83d29a283c Revert "Added ActiveRecord::Base#last_modified to work with the new fresh_when/stale? conditional get methods from Action Pack"
Needless indirection with no added value.

This reverts commit 535853e83b.
2011-12-01 20:45:47 +01:00
José Valim
956ecff833 Add a deprecation to old show exceptions API (even though it was not public). 2011-12-01 20:16:12 +01:00
José Valim
0b677b18ff Add an ExceptionWrapper that wraps an exception and provide convenience helpers. 2011-12-01 20:02:00 +01:00
David Heinemeier Hansson
535853e83b Added ActiveRecord::Base#last_modified to work with the new fresh_when/stale? conditional get methods from Action Pack 2011-12-01 19:47:14 +01:00
José Valim
b4359bc723 Allow rescue responses to be configured through a railtie. 2011-12-01 19:21:35 +01:00
David Heinemeier Hansson
218c272938 Allow fresh_when/stale? to take a record instead of an options hash [DHH] 2011-12-01 19:16:10 +01:00
Jonathan del Strother
88237daae4 Leave default_asset_host_protocol unset
When default_asset_host_protocol is left as nil, it will use absolute protocols when a request is present, and relative protocols otherwise (eg in asset generation)
2011-12-01 11:57:33 +00:00
Vijay Dev
a72839bc9d minor typo fix 2011-12-01 01:42:54 +05:30
lest
13cab6ef50 fix exception page when template contains utf-8 and parameters contain utf-8 2011-11-30 21:51:01 +03:00
Vijay Dev
88daf08258 Merge branch 'master' of github.com:lifo/docrails 2011-11-30 23:32:01 +05:30
José Valim
38ab982cff Log 'Filter chain halted as CALLBACKNAME rendered or redirected' every time a before callback halts. 2011-11-30 09:53:09 +01:00
José Valim
6093d88ed8 Fixes for using action view template in isolation. 2011-11-30 09:53:09 +01:00
Aviv Ben-Yosef
e3bc1385f1 Fixing incorrect documentation
`path_names` can only be used for affecting `new` and `edit`
2011-11-30 06:55:34 +02:00
Marc-Andre Lafortune
d3bc12b27f Handle correctly optional parameters for callable asset_host. 2011-11-29 02:01:18 -05:00
Travis Pew
237272e049 Fix ActionDispatch::Request method explanations
The methods, "post?", "put?", "head?", etc. contain an incorrect
explanation. They state that they are equivalent to request_method ==
:type, but this is not accurate because the methods convert the string
to a symbol. They are actually equivalent to:
  request_method_symbol == :type
2011-11-28 15:46:09 -05:00
lest
fe7d4f09ef put backtrace_cleaner to env 2011-11-28 19:25:37 +03:00
Vijay Dev
9ca58ba492 Revert "use any? to check for size"
This reverts commit c4af5f00f6.
2011-11-28 16:29:55 +05:30
Vasiliy Ermolovich
fb8b555c49 add namespace options to form_for
You can provide a namespace for your form to ensure uniqueness of id attributes on form elements.
The namespace attribute will be prefixed with underscore on the generate HTML id
2011-11-27 23:41:23 +03:00
lest
bc81ba2451 fix label with block in erb 2011-11-27 16:59:44 +03:00
Vijay Dev
1d89540686 Merge branch 'master' of github.com:lifo/docrails 2011-11-26 19:14:39 +05:30
Vijay Dev
c4af5f00f6 use any? to check for size 2011-11-26 18:52:10 +05:30
Xavier Noria
b6916e0b92 removes a Serialization constant left in the previous revert 2011-11-25 15:06:30 -08:00
José Valim
0a4035b12a Revert the serializers API as other alternatives are now also under discussion 2011-11-25 19:29:39 +00:00
José Valim
6f5fdf8179 Merge pull request #3747 from lest/middleware-logger
middlewares should have configurable logger
2011-11-25 05:33:26 -08:00
Uģis Ozols
a607a9d978 what's -> that's 2011-11-25 14:24:14 +02:00
Uģis Ozols
9a45867b09 Remove unnecessary comment. 2011-11-25 14:22:36 +02:00
lest
cd9d28d6fd middlewares should use logger from env 2011-11-25 13:09:46 +03:00
José Valim
fcacc6986a Merge branch 'serializers'
This implements the ActiveModel::Serializer object. Includes code, tests, generators and guides.

From José and Yehuda with love.

Conflicts:
	railties/CHANGELOG.md
2011-11-25 09:59:35 +00:00
José Valim
696d01f7f4 Add docs to serializers. Update CHANGELOGs. 2011-11-25 09:49:54 +00:00
José Valim
7fcc8c0a1f Rely solely on active_model_serializer and remove the fancy constant lookup. 2011-11-23 23:45:27 +00:00
lest
98a1717e7c configuration option to always write cookie 2011-11-23 23:50:04 +03:00
José Valim
e62de52aa3 Merge branch 'master' into serializers 2011-11-23 20:43:06 +00:00
José Valim
fd86a1b6b0 Rely on a public contract between railties instead of accessing railtie methods directly. 2011-11-23 19:06:45 +00:00
kennyj
ea70e027b6 Remove unreachable code, and add additional testcases. 2011-11-24 00:25:34 +09:00
Marc Chung
745b7a1437 - Avoid using .first since it will create an additional query.
- Handle scenario where @posts is empty.
2011-11-22 17:04:19 -07:00
Yehuda Katz
9b7be78820 Merge pull request #3724 from marcandre/media_default
stylesheet_tag default's media is "screen"
2011-11-22 12:38:05 -08:00
Marc-Andre Lafortune
05e02deb68 Make explicit the default media when calling stylesheet_tag and change the default generators. 2011-11-22 15:16:23 -05:00
José Valim
b13b49ccc1 Merge pull request #3718 from lest/fix-javascript-include-tag
javascript_include_tag should add '.js' to sources that contain '.'
2011-11-22 09:45:11 -08:00
lest
3a1d51959b deprecation warning, changelog entry 2011-11-22 17:36:58 +03:00
lest
aa491f6a9c javascript_include_tag should add '.js' to sources that contain '.' 2011-11-22 16:39:07 +03:00
lest
5bcd119b8d move show_detailed_exceptions? to Rescue module 2011-11-22 13:34:13 +03:00
lest
a9e8cf78fd add ActionController::Metal#show_detailed_exceptions? 2011-11-22 11:38:24 +03:00
Aaron Patterson
3d2bd69385 Revert "copy options keys to the right place so that undo will work correctly"
This reverts commit 3178cc9a80.
2011-11-19 20:35:54 -08:00
Yehuda Katz
bc04455f10 Merge pull request #3695 from tobiassvn/partial_path_error
Meaningful errors for unexpected partial arguments. Fixes #3573
2011-11-19 07:38:22 -08:00
Jon Leighton
603a679e87 Don't html-escape the :count option to translate if it's a Numeric. Fixes #3685. 2011-11-19 13:28:07 +00:00
Tobias Svensson
771635e858 Meaningful errors for unexpected partial arguments. Fixes #3573 2011-11-19 13:05:57 +00:00