Commit Graph

26340 Commits

Author SHA1 Message Date
Jon Leighton
365e10b8dc Remove unnecessary *args 2011-12-01 23:41:51 +00: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
6a4606d3a6 Remove unnecessary test setup. 2011-12-01 21:17:11 +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
José Valim
1e51cd957e Update CHANGELOG. 2011-12-01 13:22:28 +01:00
José Valim
f8b934224f Merge pull request #3660 from jdelStrother/asset_protocol
default_asset_host_protocol should not default to :relative
2011-12-01 04:18:41 -08: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
José Valim
cb7145700d Merge pull request #3823 from avakhov/av-length-validation-exception-msg-fix
Fix argument error message for length validation
2011-11-30 22:09:56 -08:00
Alexey Vakhov
814a4c3160 Fix argument error message for length validation 2011-12-01 09:12:16 +04:00
Jon Leighton
52eedf5e2b Add hackery to make Syck use encode_with/init_with. Fixes 1.8 after recent changes to attribute serialization. 2011-12-01 01:15:16 +00:00
Jon Leighton
1c783c6040 don't alter global state in test 2011-11-30 23:47:16 +00:00
Julius de Bruijn
4e380828ff If the table behind has no primary key, do not ask again and just return nil. 2011-11-30 23:47:16 +00:00
Jon Leighton
7a4949e7d5 consistency 2011-11-30 23:18:41 +00:00
Jon Leighton
d5f7884dc5 Don't check column type, you might implement a custom coder that serializes to a different type 2011-11-30 23:18:40 +00:00
Jon Leighton
7895182d0f omg computer science!
Implement a mini state machine for serialized attributes. This means we
do not have to deserialize the values upon initialization, which means
that if we never actually access the attribute, we never have to
deserialize it.
2011-11-30 23:18:40 +00:00
Jon Leighton
4f20eb5908 Fix typo 2011-11-30 23:18:40 +00:00
Jon Leighton
035b4244ba Don't need second param 2011-11-30 23:18:40 +00:00
Jon Leighton
efcc95acb7 No longer need to undef id as we are defining it ourselves 2011-11-30 23:18:40 +00:00
Jon Leighton
6c63f1aa44 Move some serialization stuff out of Base 2011-11-30 23:18:40 +00:00
Jon Leighton
f4853dc174 Extract attribute serialization code into a separate module 2011-11-30 23:18:40 +00:00
Jon Leighton
61489dc684 Use inheritance to avoid special-case code for the 'id' method 2011-11-30 23:18:40 +00:00
Jon Leighton
4c33d517d9 #id is an alias for whatever the primary key is 2011-11-30 23:18:40 +00:00
Jon Leighton
40840aa9ea fix indent 2011-11-30 23:18:40 +00:00
Vijay Dev
cbeeaa6ea0 expand on pluck docs 2011-12-01 01:42:54 +05:30
Vijay Dev
a72839bc9d minor typo fix 2011-12-01 01:42:54 +05:30
Vijay Dev
04b4fe77c9 s/is is/is 2011-12-01 01:42:54 +05:30
Yehuda Katz
a604983f8b Merge pull request #3816 from lest/exception-page-utf-8
fix exception page when template contains utf-8 and parameters contain utf-8
2011-11-30 11:45:18 -08:00
Vijay Dev
0092f0612d Merge pull request #3786 from nashby/add-namespace-to-form
update guides for the namespace option in form helpers
2011-11-30 11:23:37 -08:00
Vijay Dev
9811c3624a fix bad nodocs 2011-12-01 00:34:21 +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
Aaron Patterson
5b3d4f0785 switch WatchStack to use composition, tighten up API 2011-11-30 10:17:27 -08:00
Vijay Dev
88daf08258 Merge branch 'master' of github.com:lifo/docrails 2011-11-30 23:32:01 +05:30
José Valim
5b2eb64ceb Revert "Implement ArraySerializer and move old serialization API to a new namespace."
This reverts commit 8896b4fdc8.

Conflicts:

	activemodel/lib/active_model.rb
	activemodel/lib/active_model/serializable.rb
	activemodel/lib/active_model/serializer.rb
	activemodel/test/cases/serializer_test.rb
2011-11-30 18:48:17 +01:00
Aaron Patterson
be99f0c7eb Revert "avoid hundreds of thousands of calls to (Symbol|String)#to_s"
Test coverage isn't comprehensive enough to catch what this breaks. :(
This reverts commit 45dad592e4.
2011-11-30 09:46:35 -08:00
Aaron Patterson
45dad592e4 avoid hundreds of thousands of calls to (Symbol|String)#to_s 2011-11-30 09:08:30 -08:00
Aaron Patterson
4da879079e run_test method conflicts with newer minitest, so change the name 2011-11-30 09:08:30 -08:00
Jeremy Kemper
b757663af7 Using InstanceMethods in a Concern is deprecated 2011-11-30 10:06:07 -07:00
José Valim
3b07bb33e1 Merge pull request #3810 from lest/fix-warnings
fix method redefined warnings in tests
2011-11-30 08:07:51 -08:00
lest
6ce924fa9f fix method redefined warning in activemodel 2011-11-30 18:57:17 +03:00
lest
93387e2e7c fix deprecation warnings in activeresource 2011-11-30 18:57:17 +03:00
lest
565d92f578 fix method redefined warnings in tests 2011-11-30 18:57:12 +03:00
José Valim
2b96b20f3a Merge pull request #3809 from lest/test-helpers-in-erb
fix warning in tests when using render_erb helper
2011-11-30 07:11:40 -08:00
lest
a985309abc fix warning in tests when using render_erb helper 2011-11-30 18:05:23 +03:00