- 24 12月, 2013 1 次提交
-
-
由 Carlos Antonio da Silva 提交于
TLDR: always return an object that responds to the query methods from request.format, and do not touch Mime::Type[] lookup to avoid bugs. --- Long version: The initial issue was about being able to do checks like request.format.html? for request with an unknown format, where request.format would be nil. This is where the issue came from at first in #7837 and #8085 (merged in cba05887), but the implementation went down the path of adding this to the mime type lookup logic. This unfortunately introduced subtle bugs, for instance in the merged commit a test related to send_file had to be changed to accomodate the introduction of the NullType. Later another bug was found in #13064, related to the content-type being shown as #<Mime::NullType:...> for templates with localized extensions but no format included. This one was fixed in #13133, merged in 43962d6e. Besides that, custom handlers were not receiving the proper template formats anymore when passing through the rendering process, because of the NullType addition. That was found while migrating an application from 3.2 to 4.0 that uses the Markerb gem (a custom handler that generates both text and html emails from a markdown template). --- This changes the implementation moving away from returning this null object from the mime lookup, and still fixes the initial issue where request.format.zomg? would raise an exception for unknown formats due to request.format being nil.
-
- 03 12月, 2013 2 次提交
-
-
由 Guillermo Iguaran 提交于
-
由 Angelo capilleri 提交于
This PR fixes #13064 regression bug introduced by the #8085 Now in _process_format when the format is a Mime::NullType nothing is written in self.content_type. In this way the method Response#assign_default_content_type_and_charset can write the the default mime_type.
-
- 14 11月, 2013 1 次提交
-
-
由 Akshay Vishnoi 提交于
-
- 09 9月, 2013 2 次提交
-
-
由 José Valim 提交于
-
由 José Valim 提交于
-
- 05 9月, 2013 1 次提交
-
-
由 Santiago Pastorino 提交于
-
- 03 9月, 2013 2 次提交
-
-
由 Łukasz Strzałkowski 提交于
-
由 Łukasz Strzałkowski 提交于
-
- 25 8月, 2013 11 次提交
-
-
由 Łukasz Strzałkowski 提交于
Make it oneliner
-
由 Łukasz Strzałkowski 提交于
We're not dealing with templates here [ci skip]
-
由 Łukasz Strzałkowski 提交于
-
由 Łukasz Strzałkowski 提交于
[ci skip]
-
由 Łukasz Strzałkowski 提交于
-
由 Łukasz Strzałkowski 提交于
-
由 Łukasz Strzałkowski 提交于
-
由 Łukasz Strzałkowski 提交于
This reverts commit f4d602aff6cec80304b131ecfcc2676d0304f0cc.
-
由 Łukasz Strzałkowski 提交于
-
由 Łukasz Strzałkowski 提交于
-
由 Łukasz Strzałkowski 提交于
-
- 10 4月, 2013 2 次提交
-
-
由 Andrew White 提交于
-
由 Grzegorz Świrski 提交于
If a request has unknown format (eg. /foo.bar), the renderer fallbacks to default format. This patch reverts Rails 3.2 behavior after c2267db3 commit. Fixes issue #9654.
-
- 22 2月, 2012 1 次提交
-
-
由 Santiago Pastorino 提交于
Closes #5025 part 2
-
- 17 1月, 2012 2 次提交
-
-
由 Carlos Antonio da Silva 提交于
This seems to be required only when calling render :partial with an empty collection from a controller. This call happens to return no content, letting the response body empty, which means to Rails that it should go on and try to find a template to render based on the current action name, thus failing hard. Although tests keep all green, we need to check a better way to fix this.
-
由 Carlos Antonio da Silva 提交于
Options :nothing and :text => nil should be handled by ActionController::Rendering instead.
-
- 19 4月, 2011 1 次提交
-
-
由 José Valim 提交于
-
- 09 2月, 2011 1 次提交
-
-
由 José Valim 提交于
-
- 20 11月, 2010 1 次提交
-
-
由 Santiago Pastorino 提交于
-
- 10 10月, 2010 1 次提交
-
-
由 wycats 提交于
-
- 14 3月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 13 3月, 2010 1 次提交
-
-
由 José Valim 提交于
Finish cleaning up rendering stack from views and move assigns evaluation to controller (so plugins and/or controllers can overwrite just one method).
-
- 08 3月, 2010 4 次提交
-
-
由 José Valim 提交于
-
由 José Valim 提交于
-
由 José Valim 提交于
-
由 José Valim 提交于
-
- 02 3月, 2010 2 次提交
- 25 2月, 2010 2 次提交
-
-
由 José Valim 提交于
-
由 José Valim 提交于
-
- 22 2月, 2010 1 次提交
-
-
由 José Valim 提交于
-