aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/mime_responds_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* fixing wrong testAaron Patterson2011-01-171-1/+1
|
* A bunch of cleanup on the inherited template patchwycats2010-12-261-1/+1
|
* Fix tests on 1.9.2.José Valim2010-11-281-7/+9
|
* If a user wants json output then try best to render json output. In such ↵Neeraj Singh2010-11-241-0/+18
| | | | | | | | cases prefer kind_of(String) over respond_to?(to_str) [#5841 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* clean up test by using unregister methodNeeraj Singh2010-11-251-12/+6
|
* Remove the not needed setup and teardownNeeraj Singh2010-11-251-3/+0
|
* move the mime registration code to setup so thatNeeraj Singh2010-11-221-2/+19
| | | | | | | | | | | | | | | it could be cleaned up on teardown. Currently the test code test/controller/mime_responds_test.rb impacts test/dispatch/mime_type_test.rb. dispatch/mime_type_test.rb runs independently fine but when run as part of rake breaks because of new mime types registered in controller/mime_responds_test.rb Signed-off-by: José Valim <jose.valim@gmail.com>
* do not assume that there is no space betweenNeeraj Singh2010-11-221-0/+4
| | | | | | leading */* and comma Signed-off-by: José Valim <jose.valim@gmail.com>
* failing test for #6022Neeraj Singh2010-11-221-0/+34
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* current code ignores http header "Accept" if itNeeraj Singh2010-11-221-0/+6
| | | | | | | | | | | has ....,*/* . It is possible to a device to send request such that */* appear at the beginning of the "Accept" header. This patch ensures that "Accept" header is ignored for such cases too. Signed-off-by: José Valim <jose.valim@gmail.com>
* Correctly handle the case of an API response that returns a hash by treating ↵Chris Eppstein2010-11-061-0/+16
| | | | a single hash argument as the resource instead of as options.
* Return a valid empty JSON on successful PUT and DELETE requests. [#5199 ↵Szymon Nowak2010-10-121-0/+19
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Use parentheses when using assert_match followed by a regexp to avoid warnings.Emilio Tagua2010-09-271-2/+2
|
* Removed deprecated RouteSet API, still many tests failPiotr Sarnacki2010-09-051-1/+1
|
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-5/+5
| | | | 's/[ \t]*$//' -i {} \;)
* Adds tests for content negotiation change introduced in dc5300adb6d46252c26ePatrik Stenmark2010-07-041-0/+20
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Fix a bug where responders were not working properly on method override.José Valim2010-05-241-0/+13
|
* Added missing requireSantiago Pastorino2010-04-161-0/+1
|
* Fixed a bunch of tests that failed in 1.9 because they assumed that a Rack ↵wycats2010-03-191-1/+1
| | | | response was a String.
* ActionController::Base.use_accept_header is not actually used anymore, so ↵Carl Lerche2010-03-031-4/+0
| | | | let's deprecate it.
* Require persisted? in ActiveModel::Lint and remove new_record? and ↵José Valim2010-02-211-2/+2
| | | | destroyed? methods. ActionPack does not care if the resource is new or if it was destroyed, it cares only if it's persisted somewhere or not.
* Improve missing template error messages a little bit.José Valim2010-01-311-1/+1
|
* Raise an error if respond_with is invoked and no format is declared.José Valim2010-01-101-68/+62
|
* Merge branch 'master' of github.com:rails/railsYehuda Katz2009-12-101-3/+5
|\
| * Use new routing dsl in testsJoshua Peek2009-12-081-3/+5
| |
* | Responder redirects to resource if destroy fails.José Valim2009-12-071-8/+34
|/ | | | Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
* Allow ActionController::Responder to have a common entry point for all formats.José Valim2009-12-011-0/+17
| | | | Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
* Split mime responder into smaller chunks and allow action to be configured.José Valim2009-11-131-1/+21
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Unify class_inheritable_accessor and extlib_inheritable_accessor and allow ↵José Valim2009-10-171-0/+8
| | | | responder to be set in the class level.
* Use with_routing helper in tests instead of modifying global route setJoshua Peek2009-10-031-67/+83
|
* Ensure that blocks are also handled inside the responder.José Valim2009-08-291-0/+7
|
* Cleanup route reloading in tests. Prefer with_routing over using ↵Joshua Peek2009-08-161-0/+1
| | | | ActionController::Routing::Routes directly
* Got tests to pass with some more changes.Yehuda Katz2009-08-151-34/+17
| | | | | | | | | | | | | | | | * 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".
* Ensure collections are not treated as nested resources.José Valim2009-08-131-7/+20
|
* Renamed ActionController::Renderer to ActionController::Responder and ↵José Valim2009-08-081-5/+5
| | | | ActionController::MimeResponds::Responder to ActionController::MimeResponds::Collector.
* Renamed presenter to renderer, added some documentation and defined its API.José Valim2009-08-071-4/+18
|
* Encapsulate respond_with behavior in a presenter.José Valim2009-08-071-22/+18
|
* Add destroyed? to ActiveRecord, include tests for polymorphic urls for ↵José Valim2009-08-071-68/+24
| | | | destroyed objects and refactor mime responds tests and documentation.
* Add nagivational behavior to respond_with.José Valim2009-08-071-16/+73
|
* Added tests for nested resources.José Valim2009-07-311-12/+48
|
* Allow respond_with to deal with http verb accordingly.José Valim2009-07-311-3/+62
|
* Remove last TODO.José Valim2009-07-291-1/+1
| | | | Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Add a couple more tests to respond_with.José Valim2009-07-291-0/+38
| | | | Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Added respond_with.José Valim2009-07-291-1/+69
| | | | Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Added tests for respond_to class method.José Valim2009-07-291-2/+68
| | | | Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Refactor even more Responder. Move mime negotiation to request and added ↵José Valim2009-07-291-10/+12
| | | | | | respond_to class method. Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Refactor Responder to only calculate available mime types. Those are sent to ↵José Valim2009-07-291-3/+3
| | | | | | the controller that knows what to do with it (render a block or call default render). Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Cleaning up more tests and code that needed to work in both old and new baseYehuda Katz + Carl Lerche2009-06-171-9/+7
|
* RJS doesn't render with an HTML layout by defaultYehuda Katz + Carl Lerche2009-06-171-5/+3
|
* An exception is raised if a layout is missing only if the layout is missing ↵Yehuda Katz + Carl Lerche2009-06-161-8/+0
| | | | for all mimes