Joshua Peek
78129b1731
Track all AC base subclasses as possible controllers for internal testing
2009-08-25 23:34:48 -05:00
Yehuda Katz + Carl Lerche
c7ba911a43
ActionController::Metal can be a middleware
2009-08-25 12:14:31 -07:00
Joshua Peek
b58acea569
Move legacy param_parsers config onto AD::ParamsParser
2009-08-21 16:49:33 -05:00
Joshua Peek
ff1b0d3c86
k, thats really slow, lets not
2009-08-16 21:21:39 -05:00
Joshua Peek
24ad9ae3d2
Cleanup route reloading in tests. Prefer with_routing over using ActionController::Routing::Routes directly
2009-08-16 21:14:26 -05:00
Yehuda Katz
d6d550f0cb
Missing fixture template -- fixes AP tests
2009-08-15 20:33:34 -07:00
Jay Pignata
679128da58
Adding a call to logger from params_parser to give detailed debug information when invalid xml or json is posted
...
[#2481 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-15 16:51:03 -07:00
Joshua Peek
911acc10de
Axe "best fit" generation support
2009-08-15 18:08:46 -05:00
Yehuda Katz
1310231c15
Got tests to pass with some more changes.
...
* request.formats is much simpler now
* For XHRs or Accept headers with a single item, we use the Accept header
* For other requests, we use params[:format] or fallback to HTML
* This is primarily to work around the fact that browsers provide completely
broken Accept headers, so we have to whitelist the few cases we can
specifically isolate and treat other requests as coming from the browser
* For APIs, we can support single-item Accept headers, which disambiguates
from the browsers
* Requests to an action that only has an XML template from the browser will
no longer find the template. This worked previously because most browsers
provide a catch-all */*, but this was mostly accidental behavior. If you
want to serve XML, either use the :xml format in links, or explicitly
specify the XML template: render "template.xml".
2009-08-15 12:32:02 -07:00
Yehuda Katz
9f5cd0156a
More cleanup of ActionView and reduction in need for blocks in some cases:
...
* only one of partial_name or :as will be available as a local
* `object` is removed
* Simplify _layout_for in most cases.
* Remove <% render :partial do |args| %>
* <% render :partial do %> still works fine
2009-08-15 12:32:01 -07:00
Yehuda Katz
27adcd1c1a
Clean up ActionView some:
...
* Call _evaluate_assigns_and_ivars at the two entry points so we don't have to
do a check at every render.
* Make template.render viable without having to go through a wrapper method
* Remove old TemplateHandler#render(template, local_assigns) path so we don't have
to set self.template every time we render a template.
* Move Template rescuing code to Template#render so it gets caught every time.
* Pull in some tests from Pratik that test render @object in ActionView
2009-08-15 12:32:01 -07:00
Joshua Peek
940a391c9b
Attempt to rewrite most of the highly coupled router segments tests
2009-08-14 16:16:29 -05:00
Joshua Peek
f86a4b84dd
Kill routing timed tests
2009-08-14 14:30:19 -05:00
Joshua Peek
7a26c21d8e
Use safe tmp dir
2009-08-13 21:03:25 -05:00
José Valim
8692b11e81
Merge branch 'master' of git://github.com/rails/rails
2009-08-13 10:27:53 +02:00
José Valim
4f9047ecc8
Ensure collections are not treated as nested resources.
2009-08-13 10:27:41 +02:00
Yehuda Katz
4bf516e072
More perf work:
...
* Move #set_cookie and #delete_cookie inline to optimize. These optimizations should
almost certainly be sent back upstream to Rack. The optimization involves using
an ivar for cookies instead of indexing into the headers each time.
* Was able to use a bare Hash for headers now that cookies have their own joining
semantics (some code assumed that the raw cookies were an Array).
* Cache blankness of body on body=
* Improve expand_cache_key for Arrays of a single element (common in our case)
* Use a simple layout condition check unless conditions are used
* Cache visible actions
* Lazily load the UrlRewriter
* Make etag an ivar that is set on prepare!
2009-08-11 15:03:53 -07:00
Yehuda Katz
9e62d6d1c0
Tentatively accept the ":as or :object, but not both" solution
2009-08-11 15:03:53 -07:00
Yehuda Katz
02d9dd9000
Add some more caching to the lookup
2009-08-11 15:03:52 -07:00
codeape
8c32248acb
Introduce grouped_collection_select helper.
...
[#1249 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-08-09 23:58:43 -07:00
Joshua Peek
734e903af5
Deprecate router generation "best match" sorting
2009-08-09 22:53:16 -05:00
Max Lapshin
0af4b0755f
Make sure link_to generates the form with the specified :href if any [ #2254 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-10 00:58:40 +01:00
Matt Duncan
920ef4e6f3
Fixed to_label_tag to accept id attribute without changing for attribute [ #2660 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2009-08-09 23:54:21 +01: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
Jeremy Kemper
c2f9c42719
Fix that RedCloth shouldn't be required to run tests
2009-08-09 11:02:34 -07: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
rizwanreza
7dbb2b6f83
Support passing Redcloth options via textilize helper [ #2973 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 16:41:09 +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
Yehuda Katz
964bc4e855
Rendering a template from ActionView will default to looking for partials only in the current mime type.
...
* The old behavior was tested only as a side-effect of a different test--the original tests remain;
a new template in the XML mime was added.
* If you are relying on the current behavior and object to this change, please participate in
http://groups.google.com/group/rubyonrails-core/browse_thread/thread/6ef25f3c108389bd
2009-08-09 04:12:08 -03:00
Yehuda Katz
d7415f792c
Clean up partial object some more; replace passing around a block to a single block ivar
2009-08-09 04:12:08 -03:00
Michael Koziarski
b97d293374
Merge branch 'patches'
2009-08-09 13:10:14 +12:00
Michael Koziarski
370bf1401a
Don't call additional methods on builders passed to the atom_feed helper.
...
Additionally, actually test that the atom_feed helper works with :xml as an option.
[#1836 state:committed]
2009-08-09 13:10:08 +12:00
Jon Wood
271baf235d
Add :redirect to the testable RJS statements [ #2612 state:resolved]
...
Example :
assert_select_rjs :redirect, root_path
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-09 02:00:15 +01: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
rizwanreza
5786395760
Allow content_tag options to take an array [ #1741 state:resolved] [rizwanreza, Nick Quaranto]
...
Example:
content_tag('p', "limelight", :class => ["song", "play"])
# => <p class="song play">limelight</p>
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-08 22:21:32 +01:00
Dan Croak
00544c778f
Add test ensuring redirect_to uses the given protocol [ #2886 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-08 20:48:39 +01:00
José Valim
c34d6279a0
Allow radio buttons to work with booleans.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-08 18:02:07 +01:00
rizwanreza
1191e3ffaf
Add :include_blank option for select_tag [ #1987 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-08 17:58:27 +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
wmoxam
98450fd168
Fix number_to_precision rounding error [ #2071 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-08-08 02:05:10 +01:00
Jeremy Kemper
43b406bdb0
Ruby 1.9 compat: fix route recognition encoding test
2009-08-07 17:16:34 -07: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