Commit Graph

11 Commits

Author SHA1 Message Date
John Hawthorn e3130f1b84
Revert "Raise when calling render with invalid options" 2020-10-29 13:49:30 -07:00
John Hawthorn e53e2a006b Validate arguments to render calls 2020-10-28 19:30:48 -07:00
yuuji.yaginuma ea5f509643 Change `ActionDispatch::Response#content_type` returning Content-Type header as it is
Since #35709, `Response#conten_type` returns only MIME type correctly.
It is a documented behavior that this method only returns MIME type, so
this change seems appropriate.
39de7fac05/actionpack/lib/action_dispatch/http/response.rb (L245-L249)

But unfortunately, some users expect this method to return all
Content-Type that does not contain charset. This seems to be breaking
changes.

We can change this behavior with the deprecate cycle.
But, in that case, a method needs that include Content-Type with
additional parameters. And that method name is probably the
`content_type` seems to properly.

So I changed the new behavior to more appropriate `media_type` method.
And `Response#content_type` changed (as the method name) to return Content-Type
header as it is.

Fixes #35709.

[Rafael Mendonça França & Yuuji Yaginuma ]
2019-06-01 09:20:13 +09:00
Kir Shatrov dfcc766163 Use frozen string literal in actionpack/ 2017-07-29 14:02:40 +03:00
Matthew Draper 87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Rafael Mendonça França fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
Xavier Noria b326e82dc0 applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
Xavier Noria 5b6eb1d58b modernizes hash syntax in actionpack 2016-08-06 19:35:13 +02:00
Xavier Noria 35b3de8021 applies new string literal convention in actionpack/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:54:50 +02:00
Benjamin Fleischer f27360af04 Add ActionController:Renderers test
To complement actionpack/test/controller/metal/renderers_test.rb
2016-01-03 22:51:45 -06:00