Joshua Peek
734e903af5
Deprecate router generation "best match" sorting
2009-08-09 22:53:16 -05:00
Hugo Peixoto
202b091373
Added both the documentation and a test case for the collection path name customization feature.
...
[#1218 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 14:26:36 -07:00
Bence Nagy
e1b73b9752
path_names could be used to customize collection actions too
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 14:26:36 -07:00
Gabe da Silveira
1185500ff0
Remove unused routeset method routes_for_controller_and_action in favour for routes_for [ #3023 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 18:02:35 +01:00
Felipe Talavera
654568e71b
Allow to configure trusted proxies via ActionController::Base.trusted_proxies [ #2126 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 16:56:18 +01:00
José Valim
32bde66aa6
Make http digest work with different server/browser combinations
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 15:53:52 +01:00
Yehuda Katz
e28e061165
Use response_body rather than performed?
2009-08-09 04:12:09 -03:00
Jan Schwenzien
1f6afe4a74
Fix HTTP basic authentication for long credentials [ #2572 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-09 01:28:43 +01:00
Niklas Holmgren
c284412b14
Polymorphic routes generates collection URL from model class [ #1089 state:resolved]
...
Signed-off-by: Dan Pickett <dpickett@enlightsolutions.com >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 17:00:29 +01:00
Yehuda Katz
ad98827a78
Merge commit 'jose/responder'
2009-08-08 12:54:02 -03:00
José Valim
6e0ac748e4
Renamed ActionController::Renderer to ActionController::Responder and ActionController::MimeResponds::Responder to ActionController::MimeResponds::Collector.
2009-08-08 17:48:07 +02:00
Yehuda Katz
efcfce50c4
Fixes "Cached fragment hit" written to log even if fragment is not cached (Erik Andrejko) [ #2917 state:resolved]
2009-08-08 12:46:44 -03:00
Yehuda Katz
d0301e13f4
First pass at making partial rendering an Object. More cleanup to come.
2009-08-08 12:44:26 -03:00
Yehuda Katz
010a0c92eb
Rename find_by_parts and find_by_parts? to find and exists?
2009-08-07 15:00:12 -03:00
José Valim
aed135d3e2
Renamed presenter to renderer, added some documentation and defined its API.
2009-08-07 17:17:51 +02:00
José Valim
1fd65c80fc
Encapsulate respond_with behavior in a presenter.
2009-08-07 17:16:16 +02:00
José Valim
7034272354
Add destroyed? to ActiveRecord, include tests for polymorphic urls for destroyed objects and refactor mime responds tests and documentation.
2009-08-07 17:16:16 +02:00
José Valim
f59984cc81
Add nagivational behavior to respond_with.
2009-08-07 17:16:15 +02:00
José Valim
e45e120af9
Merge branch 'master' of git://github.com/rails/rails into old
2009-08-07 17:13:44 +02:00
Yehuda Katz
bfe58ac05d
Get all ActionController partial rendering to use ActionView's partial code. Consequences:
...
* It is not possible to always pre-determine the layout before going to ActionView.
This was *already* broken for render :partial => @object, :layout => true. This is
now handled by overriding render_to_body in layouts.rb and manually injecting the
partial's response. This needs to be done in ActionController since ActionController
knows enough to get _layout_for_option. There is probably a better abstraction here.
* As a result, all partial rendering can correctly restrict their layouts to the mime
type of the rendered partial. This could have previously caused a bug in some edge cases.
* If other layout-like options are added, they might need to add special code for the
case of render :partial. We should try to think of an alternate solution, if possible,
but this works for the cases we know of now.
2009-08-07 11:33:54 -03:00
José Valim
dac8927b05
Merge branch 'master' of git://github.com/rails/rails into old
2009-08-07 16:10:17 +02:00
Yehuda Katz
8534c5bf19
Start cleaning up partial path
2009-08-07 01:51:50 -03:00
Yehuda Katz
70a440aa27
Clean up render @object a bit more.
2009-08-07 00:52:13 -03:00
Yehuda Katz
0435178ff8
Remove file that doesn't seem to be used anymore
2009-08-06 22:57:42 -03:00
Yehuda Katz
71638e6760
Move AbstractController to a top-level component
2009-08-06 22:51:24 -03:00
Yehuda Katz
16c01224cb
ActionController::Metal#to_rack converted to #to_a to match normal rack convention
2009-08-06 20:05:14 -03:00
Yehuda Katz
70d779aaea
Update _render_options to reflect the fact that they're public
2009-08-06 20:03:59 -03:00
Yehuda Katz
bd6b61be88
Rename /base to /metal and make base.rb and metal.rb top-level to reflect their module locations
2009-08-06 19:52:11 -03:00
Yehuda Katz
52798fd479
rename ActionController::Http to ActionController::Metal at Josh's suggestion
2009-08-06 19:50:22 -03:00
Yehuda Katz
af375a5eb3
Replace _action_view with view_context to reflect that it is public and that it does not need to be an ActionView instance
2009-08-06 19:45:40 -03:00
Yehuda Katz
f0945409d9
replace _render_*_from_controller with render_* as they are intended to be public
2009-08-06 19:43:28 -03:00
Yehuda Katz
503ce1d01c
Update cache_control to be a Hash of options that is used to build the header.
...
* Significantly simplifies setting and modifying cache control in other areas
2009-08-02 19:39:33 -04:00
Sava Chankov
ec94c2550d
Ruby 1.9: fix Content-Length for multibyte send_data streaming
...
[#2661 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-01 20:25:59 -07:00
José Valim
5b7e81efec
Allow respond_with to deal with http verb accordingly.
2009-07-31 11:59:05 +02:00
José Valim
7a4a679dba
Remove any resource logic from respond_to.
2009-07-30 22:43:37 +02:00
José Valim
d209aea7d8
Remove last TODO.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:04 -07:00
José Valim
fa0cf663fe
Add a couple more tests to respond_with.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
09de34ca56
Added respond_with.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
bbe86077c2
Added tests for respond_to class method.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
67b2d08c0a
Ensure that the proper accept header value is set during tests.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:03 -07:00
José Valim
7e280c3bff
Remove Mime::ALL from Mime::SET.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:02 -07:00
José Valim
3e8ba616ef
Refactor even more Responder. Move mime negotiation to request and added respond_to class method.
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:02 -07:00
José Valim
3f445b316d
Refactor Responder to only calculate available mime types. Those are sent to the controller that knows what to do with it (render a block or call default render).
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-07-29 12:06:02 -07:00
Pratik Naik
e033b5d037
Merge docrails
2009-07-25 16:03:58 +01:00
Yehuda Katz
5ffaaa71d1
Define ActiveModel API Compliance
...
- Define to_model on AR
- Define to_model on ActiveModel::APICompliant
- Update test fixtures to be API Compliant
- Start using to_model in AP
2009-07-20 00:27:04 +09:00
Yehuda Katz
bb530923bc
Simplify required "ActionView compliant" API
2009-07-19 21:53:02 +09:00
Yehuda Katz
1a2946a6d9
Add some missing dependencies
2009-07-15 14:16:30 -07:00
Yehuda Katz
1273ffa186
Fix AbstractController::Layouts to work when included directly on a controller
2009-07-15 14:16:12 -07:00
Yehuda Katz
28508d444e
Centralize commonly used parts of AS in ActionController into action_controller.rb
2009-07-15 14:15:52 -07:00
Yehuda Katz
b0429f5e66
Rename method to a more obvious name
2009-07-11 23:40:36 -04:00