- 04 5月, 2014 1 次提交
-
-
由 Guo Xiang 提交于
-
- 09 10月, 2013 1 次提交
-
-
由 BlueHotDog 提交于
This fixes an issue where the respond_with worked directly with the given options hash, so that if a user relied on it after calling respond_with, the hash wouldn't be the same. Fixes #12029
-
- 25 8月, 2013 1 次提交
-
-
由 Łukasz Strzałkowski 提交于
This interface should be use when implementing renderers.
-
- 18 8月, 2013 3 次提交
-
-
由 Ben Woosley 提交于
Currently if a user calls #respond_with(csvable), but has not csv renderer available, Responder will just run through the default render behavior twice, raising ActionView::MissingTemplate both times. This changes ActionController::Metal::Responder#api_behavior to check in advance whether there is a renderer available, and raise ActionController::MissingRenderer if not.
-
由 Ben Woosley 提交于
-
- 26 7月, 2013 1 次提交
-
-
由 Akira Matsuda 提交于
any_instance.stubs + unstub with Mocha doesn't restore the original status in the following case, so we need to undef Customer#to_json before every test require 'test/unit' require 'mocha/setup' module M def foo() :foo; end end class C include M undef_method :foo end C.any_instance.stubs(:foo).returns(:mocha) C.any_instance.unstub(:foo)
-
- 25 2月, 2013 1 次提交
-
-
由 grosser 提交于
-
- 08 12月, 2012 1 次提交
-
-
由 Francesco Rodriguez 提交于
-
- 27 10月, 2012 1 次提交
-
-
由 Yves Senn 提交于
-
- 06 8月, 2012 1 次提交
-
-
由 Xavier Noria 提交于
Selecting which key extensions to include in active_support/rails made apparent the systematic usage of Object#in? in the code base. After some discussion in https://github.com/rails/rails/commit/5ea6b0df9a36d033f21b52049426257a4637028d we decided to remove it and use plain Ruby, which seems enough for this particular idiom. In this commit the refactor has been made case by case. Sometimes include? is the natural alternative, others a simple || is the way you actually spell the condition in your head, others a case statement seems more appropriate. I have chosen the one I liked the most in each case.
-
- 03 8月, 2012 2 次提交
-
-
由 Armand du Plessis 提交于
Rails includes a single character body to a head(:no_content) response to work around an old Safari bug where headers were ignored if no body sent. This patch brings the behavior slightly closer to spec if :no_content/204 is explicity requested via a head only response. Status comparison done on symbolic and numeric values Not returning any content when responding with head and limited to a status code that explicitly states no content will be returned - 100..199, 204, 205, 304.
-
由 Xavier Noria 提交于
-
- 07 7月, 2012 1 次提交
-
-
由 Mircea Pricop 提交于
Assuming the type ":touch", Collector.new was calling send(:touch), which instead of triggering method_missing and generating a new collector method, actually invoked the private method `touch` inherited from Object. By generating the method for each mime type as it is registered, the private methods on Object can never be reached by `send`, because the `Collector` will have them before `send` is called on it. To do this, a callback mechanism was added to Mime::Type This allows someone to add a callback for whenever a new mime type is registered. The callback then gets called with the new mime as a parameter. This is then used in AbstractController::Collector to generate new collector methods after each mime is registered.
-
- 06 5月, 2012 1 次提交
-
-
由 Steven Soroka 提交于
Raise a rescuable exception when Rails doesn't know what to do with the format, rather than responding with a head :not_acceptable (406)
-
- 25 4月, 2012 1 次提交
-
-
由 Jose and Yehuda 提交于
In the current router DSL, using the +match+ DSL method will match all verbs for the path to the specified endpoint. In the vast majority of cases, people are currently using +match+ when they actually mean +get+. This introduces security implications. This commit disallows calling +match+ without an HTTP verb constraint by default. To explicitly match all verbs, this commit also adds a :via => :all option to +match+. Closes #5964
-
- 07 3月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
- 06 3月, 2012 1 次提交
-
-
由 Mario Visic 提交于
-
- 23 2月, 2012 1 次提交
-
-
由 David Lee 提交于
PATCH is the correct HTML verb to map to the #update action. The semantics for PATCH allows for partial updates, whereas PUT requires a complete replacement. Changes: * adds config.default_method_for_update you can set to :patch * optionally use PATCH instead of PUT in resource routes and forms * adds the #patch verb to routes to detect PATCH requests * adds #patch? to Request * changes documentation and comments to indicate support for PATCH This change maintains complete backwards compatibility by keeping :put as the default for config.default_method_for_update.
-
- 04 2月, 2012 1 次提交
-
-
由 Prem Sichanugrist 提交于
Default responder was only using the given respond block when user requested for HTML format, or JSON/XML format with valid resource. This fix the responder so that it will use the given block regardless of the validity of the resource. Note that in this case you'll have to check for object's validity by yourself in the controller. Fixes #4796
-
- 17 1月, 2012 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
-
- 26 10月, 2011 1 次提交
-
-
由 José Valim 提交于
Responders now return 204 No Content for API requests without a response body (as in the new scaffold)
-
- 24 10月, 2011 1 次提交
-
-
由 Arun Agrawal 提交于
-
- 11 10月, 2011 1 次提交
-
-
由 Alexey Vakhov 提交于
-
- 10 10月, 2011 1 次提交
-
-
由 Denis Odorcic 提交于
-
- 03 7月, 2011 1 次提交
-
-
由 Damien Mathieu 提交于
This fixes the problem of having a non-explicit message when the :location option is not provided in respond_with.
-
- 30 6月, 2011 1 次提交
-
-
由 José Valim 提交于
-
- 26 5月, 2011 1 次提交
-
-
由 dmathieu 提交于
Fixed while traveling to heuruko
-
- 13 4月, 2011 2 次提交
-
-
由 Prem Sichanugrist 提交于
After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
-
由 Xavier Noria 提交于
-
- 12 4月, 2011 1 次提交
-
-
由 David Heinemeier Hansson 提交于
-
- 11 4月, 2011 1 次提交
-
-
由 Prem Sichanugrist 提交于
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
-
- 01 4月, 2011 3 次提交
-
-
由 Josh Kalderimis 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
由 Josh Kalderimis 提交于
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
由 Josh Kalderimis 提交于
when using respond_with with an invalid resource and custom options, the default response status and error messages should be returned Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 18 1月, 2011 1 次提交
-
-
由 Aaron Patterson 提交于
-
- 27 12月, 2010 1 次提交
-
-
由 wycats 提交于
-
- 28 11月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 25 11月, 2010 2 次提交
-
-
由 Neeraj Singh 提交于
If a user wants json output then try best to render json output. In such cases prefer kind_of(String) over respond_to?(to_str) [#5841 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
由 Neeraj Singh 提交于
-