Skip to content
Newer
Older
100644 670 lines (422 sloc) 20.5 KB
7e35cb2 @dhh Add SVG as a default mime type
dhh authored
1 * Add image/svg+xml as a default mime type.
2
3 *DHH*
4
49f6ce6 @sgrif Preparing for Rails 5.0.0.beta2
sgrif authored
5 ## Rails 5.0.0.beta2 (February 01, 2016) ##
6
8a436fd @vipulnsward Add options for rake routes task
vipulnsward authored
7 * Add `-g` and `-c` (short for _grep_ and _controller_ respectively) options
8 to `bin/rake routes`. These options return the url `name`, `verb` and
9 `path` field that match the pattern or match a specific controller.
10
11 Deprecate `CONTROLLER` env variable in `bin/rake routes`.
12
13 See #18902.
14
15 *Anton Davydov* & *Vipul A M*
49f6ce6 @sgrif Preparing for Rails 5.0.0.beta2
sgrif authored
16
e362c31 @zerothabhishek Response etags to always be weak: Prefixed W/ to value returned by Ac…
zerothabhishek authored
17 * Response etags to always be weak: Prefixes 'W/' to value returned by
18 `ActionDispatch::Http::Cache::Response#etag=`, such that etags set in
19 `fresh_when` and `stale?` are weak.
20
21 Fixes #17556.
22
23 *Abhishek Yadav*
24
a4032ca @cllns Add both HTTP Response Code and Type to assertion messages
cllns authored
25 * Provide the name of HTTP Status code in assertions.
26
27 *Sean Collins*
28
ce13f79 @Edouard-chin Better error message when running `rake routes` with CONTROLLER arg:
Edouard-chin authored
29 * More explicit error message when running `rake routes`. `CONTROLLER` argument
30 can now be supplied in different ways:
f5ab405 @senny docs, formatting pass over changelogs. [ci skip]
senny authored
31 `Rails::WelcomeController`, `Rails::Welcome`, `rails/welcome`.
ce13f79 @Edouard-chin Better error message when running `rake routes` with CONTROLLER arg:
Edouard-chin authored
32
f5ab405 @senny docs, formatting pass over changelogs. [ci skip]
senny authored
33 Fixes #22918.
ce13f79 @Edouard-chin Better error message when running `rake routes` with CONTROLLER arg:
Edouard-chin authored
34
35 *Edouard Chin*
36
a310785 @prathamesh-sonpatki Allow AC::Parameters as an argument to url_helpers
prathamesh-sonpatki authored
37 * Allow `ActionController::Parameters` instances as an argument to URL
4824971 @prathamesh-sonpatki Fix typo in ActionPack CHANGELOG [ci skip]
prathamesh-sonpatki authored
38 helper methods. An `ArgumentError` will be raised if the passed parameters
a310785 @prathamesh-sonpatki Allow AC::Parameters as an argument to url_helpers
prathamesh-sonpatki authored
39 are not secure.
40
f5ab405 @senny docs, formatting pass over changelogs. [ci skip]
senny authored
41 Fixes #22832.
a310785 @prathamesh-sonpatki Allow AC::Parameters as an argument to url_helpers
prathamesh-sonpatki authored
42
43 *Prathamesh Sonpatki*
44
3e98819 @mastahyeti add option for per-form CSRF tokens
mastahyeti authored
45 * Add option for per-form CSRF tokens.
46
77d01e3 @mastahyeti add greg
mastahyeti authored
47 *Greg Ose & Ben Toews*
3e98819 @mastahyeti add option for per-form CSRF tokens
mastahyeti authored
48
1c361ea @bf4 Test ActionController::Renderers::use_renderers
bf4 authored
49 * Add tests and documentation for `ActionController::Renderers::use_renderers`.
50
51 *Benjamin Fleischer*
52
28f648d @prathamesh-sonpatki Fix AC::Parameters#to_unsafe_h to return all unfiltered values
prathamesh-sonpatki authored
53 * Fix `ActionController::Parameters#convert_parameters_to_hashes` to return filtered
54 or unfiltered values based on from where it is called, `to_h` or `to_unsafe_h`
55 respectively.
56
f5ab405 @senny docs, formatting pass over changelogs. [ci skip]
senny authored
57 Fixes #22841.
28f648d @prathamesh-sonpatki Fix AC::Parameters#to_unsafe_h to return all unfiltered values
prathamesh-sonpatki authored
58
59 *Prathamesh Sonpatki*
60
ff8a62d @jcoyne Add AC::Parameters#include?
jcoyne authored
61 * Add `ActionController::Parameters#include?`
62
63 *Justin Coyne*
64
099ddfd @eileencodes Add CHANGELOG headers for Rails 5.0.0.beta1
eileencodes authored
65 ## Rails 5.0.0.beta1 (December 18, 2015) ##
66
dc4429c @derekprior Deprecate `redirect_to :back`
derekprior authored
67 * Deprecate `redirect_to :back` in favor of `redirect_back`, which accepts a
68 required `fallback_location` argument, thus eliminating the possibility of a
69 `RedirectBackError`.
70
71 *Derek Prior*
72
13fd558 @derekprior Add `redirect_back` for safer referrer redirects
derekprior authored
73 * Add `redirect_back` method to `ActionController::Redirecting` to provide a
74 way to safely redirect to the `HTTP_REFERER` if it is present, falling back
75 to a provided redirect otherwise.
76
77 *Derek Prior*
78
4414c5d @eileencodes Remove ActionController::TestCase from documentation
eileencodes authored
79 * `ActionController::TestCase` will be moved to it's own gem in Rails 5.1
80
81 With the speed improvements made to `ActionDispatch::IntegrationTest` we no
82 longer need to keep two separate code bases for testing controllers. In
83 Rails 5.1 `ActionController::TestCase` will be deprecated and moved into a
84 gem outside of Rails source.
85
86 This is a documentation deprecation so that going forward so new tests will use
87 `ActionDispatch::IntegrationTest` instead of `ActionController::TestCase`.
88
89 *Eileen M. Uchitelle*
90
290a536 @jmbejar Update Changelog with the added response_format option in AD::DebugEx…
jmbejar authored
91 * Add a `response_format` option to `ActionDispatch::DebugExceptions`
92 to configure the format of the response when errors occur in
93 development mode.
94
95 If `response_format` is `:default` the debug info will be rendered
96 in an HTML page. In the other hand, if the provided value is `:api`
97 the debug info will be rendered in the original response format.
98
99 *Jorge Bejar*
100
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
101 * Change the `protect_from_forgery` prepend default to `false`.
3979403 @eileencodes Change the `protect_from_forgery` prepend default to `false`
eileencodes authored
102
103 Per this comment
104 https://github.com/rails/rails/pull/18334#issuecomment-69234050 we want
105 `protect_from_forgery` to default to `prepend: false`.
106
ee14fbe @vipulnsward Pass through AP CHANGELOG [ci skip]
vipulnsward authored
107 `protect_from_forgery` will now be inserted into the callback chain at the
3979403 @eileencodes Change the `protect_from_forgery` prepend default to `false`
eileencodes authored
108 point it is called in your application. This is useful for cases where you
109 want to `protect_from_forgery` after you perform required authentication
110 callbacks or other callbacks that are required to run after forgery protection.
111
112 If you want `protect_from_forgery` callbacks to always run first, regardless of
113 position they are called in your application then you can add `prepend: true`
114 to your `protect_from_forgery` call.
115
116 Example:
117
118 ```ruby
119 protect_from_forgery prepend: true
120 ```
121
cd355a8 @eileencodes Fix spacing on CHANGELOG name
eileencodes authored
122 *Eileen M. Uchitelle*
3979403 @eileencodes Change the `protect_from_forgery` prepend default to `false`
eileencodes authored
123
e6e056c In url_for, never append ? when the query string is empty anyway.
Paul Grayson authored
124 * In url_for, never append a question mark to the URL when the query string
125 is empty anyway. (It used to do that when called like `url_for(controller:
126 'x', action: 'y', q: {})`.)
127
f9e8d2c @yui-knk [ci skip] Add author's name to CHANGELOG
yui-knk authored
128 *Paul Grayson*
129
59ab2d1 @greysteil Catch invalid UTF-8 querystring values and respond with BadRequest
greysteil authored
130 * Catch invalid UTF-8 querystring values and respond with BadRequest
131
132 Check querystring params for invalid UTF-8 characters, and raise an
133 ActionController::BadRequest error if present. Previously these strings
134 would typically trigger errors further down the stack.
135
136 *Grey Baker*
137
ea9bc06 @sgrif Merge pull request #20715 from simsalabim/feature/parse-rss-atom-as-xml
sgrif authored
138 * Parse RSS/ATOM responses as XML, not HTML.
139
140 *Alexander Kaupanin*
141
3f81b37 @agis- Show helpful messages on invalid param. encodings
agis- authored
142 * Show helpful message in `BadRequest` exceptions due to invalid path
143 parameter encodings.
144
145 Fixes #21923.
146
147 *Agis Anastasopoulos*
148
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
149 * Add the ability of returning arbitrary headers to `ActionDispatch::Static`.
5226058 @yuki24 Add the ability of returning arbitrary headers to ActionDispatch::Static
yuki24 authored
150
151 Now ActionDispatch::Static can accept HTTP headers so that developers
152 will have control of returning arbitrary headers like
153 'Access-Control-Allow-Origin' when a response is delivered. They can be
154 configured with `#config`:
155
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
156 Example:
157
158 config.public_file_server.headers = {
159 "Cache-Control" => "public, max-age=60",
160 "Access-Control-Allow-Origin" => "http://rubyonrails.org"
161 }
5226058 @yuki24 Add the ability of returning arbitrary headers to ActionDispatch::Static
yuki24 authored
162
163 *Yuki Nishijima*
164
4db921a @rafaelsales Allow multiple `root` routes in same scope level
rafaelsales authored
165 * Allow multiple `root` routes in same scope level. Example:
166
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
167 Example:
168
169 root 'blog#show', constraints: ->(req) { Hostname.blog_site?(req.host) }
170 root 'landing#show'
171
4db921a @rafaelsales Allow multiple `root` routes in same scope level
rafaelsales authored
172 *Rafael Sales*
173
bcfbd8b @merhard Fix mounted engine named routes regression
merhard authored
174 * Fix regression in mounted engine named routes generation for app deployed to
175 a subdirectory. `relative_url_root` was prepended to the path twice (e.g.
176 "/subdir/subdir/engine_path" instead of "/subdir/engine_path")
177
178 Fixes #20920. Fixes #21459.
179
180 *Matthew Erhard*
181
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
182 * `ActionDispatch::Response#new` no longer applies default headers. If you want
e16afe6 @tenderlove stop applying default headers in ActionDispatch::Response
tenderlove authored
183 default headers applied to the response object, then call
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
184 `ActionDispatch::Response.create`. This change only impacts people who are
e16afe6 @tenderlove stop applying default headers in ActionDispatch::Response
tenderlove authored
185 directly constructing an `ActionDispatch::Response` object.
186
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
187 * Accessing mime types via constants like `Mime::HTML` is deprecated. Please
8325d4c @tenderlove update changelog for mime changes
tenderlove authored
188 change code like this:
189
c4ac23b @kangkyu Update CHANGELOG.md
kangkyu authored
190 Mime::HTML
8325d4c @tenderlove update changelog for mime changes
tenderlove authored
191
192 To this:
193
c4ac23b @kangkyu Update CHANGELOG.md
kangkyu authored
194 Mime[:html]
8325d4c @tenderlove update changelog for mime changes
tenderlove authored
195
196 This change is so that Rails will not manage a list of constants, and fixes
197 an issue where if a type isn't registered you could possibly get the wrong
198 object.
199
565094a @jeremy Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compat
jeremy authored
200 `Mime[:html]` is available in older versions of Rails, too, so you can
201 safely change libraries and plugins and maintain compatibility with
202 multiple versions of Rails.
203
ee63532 @bernerdschaefer `url_for` does not modify polymorphic options
bernerdschaefer authored
204 * `url_for` does not modify its arguments when generating polymorphic URLs.
205
206 *Bernerd Schaefer*
207
f674922 @jeremy Make `config.force_ssl` less dangerous to try and easier to disable
jeremy authored
208 * Make it easier to opt in to `config.force_ssl` and `config.ssl_options` by
209 making them less dangerous to try and easier to disable.
210
211 SSL redirect:
212 * Move `:host` and `:port` options within `redirect: { … }`. Deprecate.
213 * Introduce `:status` and `:body` to customize the redirect response.
214 The 301 permanent default makes it difficult to test the redirect and
215 back out of it since browsers remember the 301. Test with a 302 or 307
216 instead, then switch to 301 once you're confident that all is well.
217
218 HTTP Strict Transport Security (HSTS):
219 * Shorter max-age. Shorten the default max-age from 1 year to 180 days,
220 the low end for https://www.ssllabs.com/ssltest/ grading and greater
221 than the 18-week minimum to qualify for browser preload lists.
222 * Disabling HSTS. Setting `hsts: false` now sets `hsts { expires: 0 }`
223 instead of omitting the header. Omitting does nothing to disable HSTS
224 since browsers hang on to your previous settings until they expire.
225 Sending `{ hsts: { expires: 0 }}` flushes out old browser settings and
226 actually disables HSTS:
227 http://tools.ietf.org/html/rfc6797#section-6.1.1
228 * HSTS Preload. Introduce `preload: true` to set the `preload` flag,
229 indicating that your site may be included in browser preload lists,
230 including Chrome, Firefox, Safari, IE11, and Edge. Submit your site:
231 https://hstspreload.appspot.com
232
233 *Jeremy Daer*
234
a62a164 @senny minor copy edit. [ci skip]
senny authored
235 * Update `ActionController::TestSession#fetch` to behave more like
236 `ActionDispatch::Request::Session#fetch` when using non-string keys.
0258ef3 @jeremyf Updating TestSession to access with indifference
jeremyf authored
237
238 *Jeremy Friesen*
239
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
240 * Using strings or symbols for middleware class names is deprecated. Convert
83b767c @tenderlove Using strings or symbols for middleware class names is deprecated.
tenderlove authored
241 things like this:
242
243 middleware.use "Foo::Bar"
244
245 to this:
246
247 middleware.use Foo::Bar
248
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
249 * `ActionController::TestSession` now accepts a default value as well as
3004cc8 Adds missing argument handling for ActionController::TestSession to
Matthew Gerrior authored
250 a block for generating a default value based off the key provided.
251
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
252 This fixes calls to `session#fetch` in `ApplicationController` instances that
3004cc8 Adds missing argument handling for ActionController::TestSession to
Matthew Gerrior authored
253 take more two arguments or a block from raising `ArgumentError: wrong
254 number of arguments (2 for 1)` when performing controller tests.
255
256 *Matthew Gerrior*
257
780af27 @repinel Fix exception overwritten for parameters fetch method
repinel authored
258 * Fix `ActionController::Parameters#fetch` overwriting `KeyError` returned by
259 default block.
260
261 *Jonas Schuber Erlandsson*, *Roque Pinel*
262
14a3bd5 @sikachu Make AC::Parameters not inherited from Hash
sikachu authored
263 * `ActionController::Parameters` no longer inherits from
264 `HashWithIndifferentAccess`
265
266 Inheriting from `HashWithIndifferentAccess` allowed users to call any
267 enumerable methods on `Parameters` object, resulting in a risk of losing the
268 `permitted?` status or even getting back a pure `Hash` object instead of
269 a `Parameters` object with proper sanitization.
270
84b861f @sikachu Update documentation on `AC::Parameters`
sikachu authored
271 By not inheriting from `HashWithIndifferentAccess`, we are able to make
14a3bd5 @sikachu Make AC::Parameters not inherited from Hash
sikachu authored
272 sure that all methods that are defined in `Parameters` object will return
273 a proper `Parameters` object with a correct `permitted?` flag.
274
275 *Prem Sichanugrist*
276
284a9ba @jdantonio Replaced `ActiveSupport::Concurrency::Latch` with concurrent-ruby.
jdantonio authored
277 * Replaced `ActiveSupport::Concurrency::Latch` with `Concurrent::CountDownLatch`
278 from the concurrent-ruby gem.
279
280 *Jerry D'Antonio*
281
33b9317 @gmalette Allow filtering params based on parent keys
gmalette authored
282 * Add ability to filter parameters based on parent keys.
283
284 # matches {credit_card: {code: "xxxx"}}
285 # doesn't match {file: { code: "xxxx"}}
286 config.filter_parameters += [ "credit_card.code" ]
287
288 See #13897.
289
290 *Guillaume Malette*
291
cf81a3b @meinac Deprecate passing hash as first parameter into ActionController::Head
meinac authored
292 * Deprecate passing first parameter as `Hash` and default status code for `head` method.
293
294 *Mehmet Emin İNAÇ*
295
0a9b86b @greysteil Handle param-parsing errors from Rack in ExceptionWrapper
greysteil authored
296 * Adds`Rack::Utils::ParameterTypeError` and `Rack::Utils::InvalidParameterError`
297 to the rescue_responses hash in `ExceptionWrapper` (Rack recommends
298 integrators serve 400s for both of these).
299
300 *Grey Baker*
301
f3df216 @spastorino Add CHANGELOG entries for API apps functionality
spastorino authored
302 * Add support for API only apps.
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
303 `ActionController::API` is added as a replacement of
304 `ActionController::Base` for this kind of applications.
f3df216 @spastorino Add CHANGELOG entries for API apps functionality
spastorino authored
305
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
306 *Santiago Pastorino*, *Jorge Bejar*
f3df216 @spastorino Add CHANGELOG entries for API apps functionality
spastorino authored
307
ca83436 @tgxworld Remove `assigns` and `assert_template`.
tgxworld authored
308 * Remove `assigns` and `assert_template`. Both methods have been extracted
309 into a gem at https://github.com/rails/rails-controller-testing.
310
311 See #18950.
312
313 *Alan Guo Xiang Tan*
314
3ff3949 @eliotsykes config.static_index configures directory index "index.html" filename
eliotsykes authored
315 * `FileHandler` and `Static` middleware initializers accept `index` argument
316 to configure the directory index file name. Defaults to `index` (as in
317 `index.html`).
318
319 See #20017.
320
321 *Eliot Sykes*
322
44781b6 @meinac Deprecate `:nothing` option for render method
meinac authored
323 * Deprecate `:nothing` option for `render` method.
324
325 *Mehmet Emin İNAÇ*
326
daba090 @prathamesh-sonpatki Pass over CHANGELOGS [ci skip]
prathamesh-sonpatki authored
327 * Fix `rake routes` not showing the right format when
6d9ad0d @arthurnn Add changelog for rake routes default fix
arthurnn authored
328 nesting multiple routes.
329
330 See #18373.
331
332 *Ravil Bayramgalin*
333
2b8acdc @kmcphillips Override default form builder for a controller
kmcphillips authored
334 * Add ability to override default form builder for a controller.
335
336 class AdminController < ApplicationController
337 default_form_builder AdminFormBuilder
338 end
339
340 *Kevin McPhillips*
341
0de4a23 @sb8244 head no_content when there is no template or action performed
sb8244 authored
342 * For actions with no corresponding templates, render `head :no_content`
343 instead of raising an error. This allows for slimmer API controller
344 methods that simply work, without needing further instructions.
345
346 See #19036.
347
348 *Stephen Bussey*
349
9d9cc47 @georgeclaghorn Provide friendlier access to request variants
georgeclaghorn authored
350 * Provide friendlier access to request variants.
351
352 request.variant = :phone
353 request.variant.phone? # true
354 request.variant.tablet? # false
355
356 request.variant = [:phone, :tablet]
357 request.variant.phone? # true
358 request.variant.desktop? # false
359 request.variant.any?(:phone, :desktop) # true
360 request.variant.any?(:desktop, :watch) # false
361
362 *George Claghorn*
363
b6b0884 @arthurnn Add changelog entry for #19271
arthurnn authored
364 * Fix regression where a gzip file response would have a Content-type,
365 even when it was a 304 status code.
366
367 See #19271.
368
369 *Kohei Suzuki*
370
cdbf685 @senny pass over CHANGELOGs. [ci skip]
senny authored
371 * Fix handling of empty `X_FORWARDED_HOST` header in `raw_host_with_port`.
b49cac8 @braintreeps Fix handling of empty X_FORWARDED_HOST header.
braintreeps authored
372
cdbf685 @senny pass over CHANGELOGs. [ci skip]
senny authored
373 Previously, an empty `X_FORWARDED_HOST` header would cause
374 `Actiondispatch::Http:URL.raw_host_with_port` to return `nil`, causing
375 `Actiondispatch::Http:URL.host` to raise a `NoMethodError`.
b49cac8 @braintreeps Fix handling of empty X_FORWARDED_HOST header.
braintreeps authored
376
377 *Adam Forsyth*
378
4d4440c @phoet add changelog entry
phoet authored
379 * Allow `Bearer` as token-keyword in `Authorization-Header`.
380
ee14fbe @vipulnsward Pass through AP CHANGELOG [ci skip]
vipulnsward authored
381 Additionally to `Token`, the keyword `Bearer` is acceptable as a keyword
4d4440c @phoet add changelog entry
phoet authored
382 for the auth-token. The `Bearer` keyword is described in the original
383 OAuth RFC and used in libraries like Angular-JWT.
384
385 See #19094.
386
387 *Peter Schröder*
388
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
389 * Drop request class from `RouteSet` constructor.
9d9cc47 @georgeclaghorn Provide friendlier access to request variants
georgeclaghorn authored
390
849148b @mnaberez Fix typo in Action Pack changelog. [ci skip]
mnaberez authored
391 If you would like to use a custom request class, please subclass and implement
c210892 @tenderlove Drop request class from RouteSet constructor.
tenderlove authored
392 the `request_class` method.
393
394 *tenderlove@ruby-lang.org*
395
6c14252 @yasyf Fallback to RAILS_RELATIVE_URL_ROOT in `url_for`.
yasyf authored
396 * Fallback to `ENV['RAILS_RELATIVE_URL_ROOT']` in `url_for`.
397
398 Fixed an issue where the `RAILS_RELATIVE_URL_ROOT` environment variable is not
399 prepended to the path when `url_for` is called. If `SCRIPT_NAME` (used by Rack)
400 is set, it takes precedence.
401
402 Fixes #5122.
403
404 *Yasyf Mohamedali*
405
89edfbd @tgxworld Partition routes during setup.
tgxworld authored
406 * Partitioning of routes is now done when the routes are being drawn. This
407 helps to decrease the time spent filtering the routes during the first request.
408
409 *Guo Xiang Tan*
410
71fc789 @senny add CHANGELOG for f6e293e. [ci skip]
senny authored
411 * Fix regression in functional tests. Responses should have default headers
412 assigned.
413
414 See #18423.
415
416 *Jeremy Kemper*, *Yves Senn*
417
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
418 * Deprecate `AbstractController#skip_action_callback` in favor of individual skip_callback methods
3fbc632 @iainbeeston Deprecate `AbstractController::Callbacks#skip_action_callback`
iainbeeston authored
419 (which can be made to raise an error if no callback was removed).
420
421 *Iain Beeston*
422
08d9c75 @carlosantoniodasilva Fix changelog indent [ci skip]
carlosantoniodasilva authored
423 * Alias the `ActionDispatch::Request#uuid` method to `ActionDispatch::Request#request_id`.
7f5cf3a @dilizarov Aliased the ActionDispatch::Request#uuid method with ActionDispatch::…
dilizarov authored
424 Due to implementation, `config.log_tags = [:request_id]` also works in substitute
425 for `config.log_tags = [:uuid]`.
426
427 *David Ilizarov*
428
321db4a @brainopia Change filter on /rails/info/routes to use an actual path regexp from…
brainopia authored
429 * Change filter on /rails/info/routes to use an actual path regexp from rails
430 and not approximate javascript version. Oniguruma supports much more
431 extensive list of features than javascript regexp engine.
432
433 Fixes #18402.
434
435 *Ravil Bayramgalin*
436
bf067b4 @lautis Handle non-string authenticity tokens
lautis authored
437 * Non-string authenticity tokens do not raise NoMethodError when decoding
438 the masked token.
439
440 *Ville Lautanala*
441
e71f5da @senny some indenting and punctuation fixes. [ci skip]
senny authored
442 * Add `http_cache_forever` to Action Controller, so we can cache a response
443 that never gets expired.
2ed3942 @arthurnn Implement http_cache_forever to ActionController
arthurnn authored
444
445 *arthurnn*
446
e71f5da @senny some indenting and punctuation fixes. [ci skip]
senny authored
447 * `ActionController#translate` supports symbols as shortcuts.
ea747f7 @jonatack [skip ci] Lookup can be a noun but it is not a verb
jonatack authored
448 When a shortcut is given it also performs the lookup without the action
449 name.
40a8130 @printercu ActionController#translate supports symbols
printercu authored
450
451 *Max Melentiev*
452
050fda0 @claudiob Accept a collection in fresh_when and stale?
claudiob authored
453 * Expand `ActionController::ConditionalGet#fresh_when` and `stale?` to also
454 accept a collection of records as the first argument, so that the
455 following code can be written in a shorter form.
456
457 # Before
458 def index
6976886 @y-yagi fix typo in fresh_when example [ci skip]
y-yagi authored
459 @articles = Article.all
460 fresh_when(etag: @articles, last_modified: @articles.maximum(:updated_at))
050fda0 @claudiob Accept a collection in fresh_when and stale?
claudiob authored
461 end
462
463 # After
464 def index
6976886 @y-yagi fix typo in fresh_when example [ci skip]
y-yagi authored
465 @articles = Article.all
050fda0 @claudiob Accept a collection in fresh_when and stale?
claudiob authored
466 fresh_when(@articles)
467 end
468
469 *claudiob*
470
b9c63b0 @tsun1215 Explicitly ignored wildcard verbs from head_routes
tsun1215 authored
471 * Explicitly ignored wildcard verbs when searching for HEAD routes before fallback
472
08d9c75 @carlosantoniodasilva Fix changelog indent [ci skip]
carlosantoniodasilva authored
473 Fixes an issue where a mounted rack app at root would intercept the HEAD
b9c63b0 @tsun1215 Explicitly ignored wildcard verbs from head_routes
tsun1215 authored
474 request causing an incorrect behavior during the fall back to GET requests.
475
476 Example:
e71f5da @senny some indenting and punctuation fixes. [ci skip]
senny authored
477
478 draw do
479 get '/home' => 'test#index'
480 mount rack_app, at: '/'
481 end
482 head '/home'
483 assert_response :success
484
b9c63b0 @tsun1215 Explicitly ignored wildcard verbs from head_routes
tsun1215 authored
485 In this case, a HEAD request runs through the routes the first time and fails
486 to match anything. Then, it runs through the list with the fallback and matches
487 `get '/home'`. The original behavior would match the rack app in the first pass.
488
489 *Terence Sun*
490
b19999f @kirs Migrating xhr methods to keyword arguments syntax
kirs authored
491 * Migrating xhr methods to keyword arguments syntax
492 in `ActionController::TestCase` and `ActionDispatch::Integration`
493
494 Old syntax:
495
496 xhr :get, :create, params: { id: 1 }
497
498 New syntax example:
499
500 get :create, params: { id: 1 }, xhr: true
501
502 *Kir Shatrov*
503
0eb3ba0 @rafaelfranca Improve CHANGELOG
rafaelfranca authored
504 * Migrating to keyword arguments syntax in `ActionController::TestCase` and
afe402d @senny unify CHANGELOG format. [ci skip]
senny authored
505 `ActionDispatch::Integration` HTTP request methods.
baf14ae @kirs Switch to kwargs in ActionController::TestCase and ActionDispatch::In…
kirs authored
506
afe402d @senny unify CHANGELOG format. [ci skip]
senny authored
507 Example:
0eb3ba0 @rafaelfranca Improve CHANGELOG
rafaelfranca authored
508
509 post :create, params: { y: x }, session: { a: 'b' }
510 get :view, params: { id: 1 }
511 get :view, params: { id: 1 }, format: :json
baf14ae @kirs Switch to kwargs in ActionController::TestCase and ActionDispatch::In…
kirs authored
512
513 *Kir Shatrov*
514
afe402d @senny unify CHANGELOG format. [ci skip]
senny authored
515 * Preserve default url options when generating URLs.
db870f2 @tekin Preserve default url options when generating URLs
tekin authored
516
863fcfa @senny quick pass over changelogs. [ci skip]
senny authored
517 Fixes an issue that would cause `default_url_options` to be lost when
db870f2 @tekin Preserve default url options when generating URLs
tekin authored
518 generating URLs with fewer positional arguments than parameters in the
519 route definition.
520
521 *Tekin Suleyman*
522
863fcfa @senny quick pass over changelogs. [ci skip]
senny authored
523 * Deprecate `*_via_redirect` integration test methods.
7d9c5c1 @rafaelfranca Add CHANGELOG entry
rafaelfranca authored
524
525 Use `follow_redirect!` manually after the request call for the same behavior.
526
527 *Aditya Kapoor*
528
801e399 @brainopia Add ActionController::Renderer
brainopia authored
529 * Add `ActionController::Renderer` to render arbitrary templates
530 outside controller actions.
531
6566289 @brainopia Add ActionController::Base.render
brainopia authored
532 Its functionality is accessible through class methods `render` and
533 `renderer` of `ActionController::Base`.
534
801e399 @brainopia Add ActionController::Renderer
brainopia authored
535 *Ravil Bayramgalin*
536
685142e @brainopia Support `:assigns` option when rendering with controllers/mailers.
brainopia authored
537 * Support `:assigns` option when rendering with controllers/mailers.
538
539 *Ravil Bayramgalin*
540
a94f8e7 @senny Merge pull request #18423 from jone/remove-default-header
senny authored
541 * Default headers, removed in controller actions, are no longer reapplied on
0739480 @jone Default headers, removed in controller actions, will not be reapplied…
jone authored
542 the test response.
543
544 *Jonas Baumann*
545
863fcfa @senny quick pass over changelogs. [ci skip]
senny authored
546 * Deprecate all `*_filter` callbacks in favor of `*_action` callbacks.
7644a99 @seuros Deprecate all *_filter callbacks in favor of *_action callbacks
seuros authored
547
548 *Rafael Mendonça França*
549
863fcfa @senny quick pass over changelogs. [ci skip]
senny authored
550 * Allow you to pass `prepend: false` to `protect_from_forgery` to have the
0074bbb @simi Add prepend option to protect_from_forgery.
simi authored
551 verification callback appended instead of prepended to the chain.
552 This allows you to let the verification step depend on prior callbacks.
afe402d @senny unify CHANGELOG format. [ci skip]
senny authored
553
0074bbb @simi Add prepend option to protect_from_forgery.
simi authored
554 Example:
555
556 class ApplicationController < ActionController::Base
557 before_action :authenticate
9af5f33 @dhh Fix the example (for realz)
dhh authored
558 protect_from_forgery prepend: false, unless: -> { @authenticated_by.oauth? }
0074bbb @simi Add prepend option to protect_from_forgery.
simi authored
559
560 private
561 def authenticate
562 if oauth_request?
563 # authenticate with oauth
564 @authenticated_by = 'oauth'.inquiry
565 else
566 # authenticate with cookies
567 @authenticated_by = 'cookie'.inquiry
568 end
569 end
570 end
571
572 *Josef Šimánek*
573
a7621d7 @senny formatting pass over CHANGELOGs. [ci skip]
senny authored
574 * Remove `ActionController::HideActions`.
08d3f0e @brainopia Remove ActionController::HideActions (closes #18336)
brainopia authored
575
576 *Ravil Bayramgalin*
577
afd5e9a @carlosantoniodasilva Remove respond_to/respond_with placeholder methods
carlosantoniodasilva authored
578 * Remove `respond_to`/`respond_with` placeholder methods, this functionality
579 has been extracted to the `responders` gem.
580
581 *Carlos Antonio da Silva*
582
92e27d3 @rafaelfranca Remove deprecated assertion files
rafaelfranca authored
583 * Remove deprecated assertion files.
584
585 *Rafael Mendonça França*
586
34e3807 @rafaelfranca Remove deprecated usage of string keys in URL helpers
rafaelfranca authored
587 * Remove deprecated usage of string keys in URL helpers.
588
589 *Rafael Mendonça França*
590
e4e1fd7 @rafaelfranca Remove deprecated `only_path` option on `*_path` helpers
rafaelfranca authored
591 * Remove deprecated `only_path` option on `*_path` helpers.
592
593 *Rafael Mendonça França*
594
2cc91c3 @rafaelfranca Remove deprecated `NamedRouteCollection#helpers`
rafaelfranca authored
595 * Remove deprecated `NamedRouteCollection#helpers`.
596
597 *Rafael Mendonça França*
598
1f3b0a8 @rafaelfranca Remove deprecated support to define routes with `:to` option that
rafaelfranca authored
599 * Remove deprecated support to define routes with `:to` option that doesn't contain `#`.
600
601 *Rafael Mendonça França*
602
4b19d5b @rafaelfranca Remove deprecated `ActionDispatch::Response#to_ary`
rafaelfranca authored
603 * Remove deprecated `ActionDispatch::Response#to_ary`.
604
605 *Rafael Mendonça França*
606
7676659 @rafaelfranca Remove deprecated `ActionDispatch::Request#deep_munge`
rafaelfranca authored
607 * Remove deprecated `ActionDispatch::Request#deep_munge`.
608
609 *Rafael Mendonça França*
610
7fe7973 @rafaelfranca Remove deprecated `ActionDispatch::Http::Parameters#symbolized_path_p…
rafaelfranca authored
611 * Remove deprecated `ActionDispatch::Http::Parameters#symbolized_path_parameters`.
612
613 *Rafael Mendonça França*
614
e4cfd35 @rafaelfranca Remove deprecated option `use_route` in controller tests
rafaelfranca authored
615 * Remove deprecated option `use_route` in controller tests.
616
617 *Rafael Mendonça França*
618
2fde159 @kommen Ensure append_info_to_payload is called even if an exception is raised.
kommen authored
619 * Ensure `append_info_to_payload` is called even if an exception is raised.
620
8a40bf2 @davydovanton [skip ci] Fix typos in actionpack changelog and security guide
davydovanton authored
621 Fixes an issue where when an exception is raised in the request the additional
2fde159 @kommen Ensure append_info_to_payload is called even if an exception is raised.
kommen authored
622 payload data is not available.
623
0990826 @senny release notes, extract notable changes from Action Pack CHANGELOG.
senny authored
624 See #14903.
2fde159 @kommen Ensure append_info_to_payload is called even if an exception is raised.
kommen authored
625
626 *Dieter Komendera*, *Margus Pärt*
627
7ef7f1c @robin850 Correctly use the response's status code calling head
robin850 authored
628 * Correctly rely on the response's status code to handle calls to `head`.
629
630 *Robin Dupret*
631
75757c5 @prathamesh-sonpatki Remove single space response body for head request
prathamesh-sonpatki authored
632 * Using `head` method returns empty response_body instead
633 of returning a single space " ".
634
635 The old behavior was added as a workaround for a bug in an early
636 version of Safari, where the HTTP headers are not returned correctly
637 if the response body has a 0-length. This is been fixed since and
638 the workaround is no longer necessary.
639
640 Fixes #18253.
641
642 *Prathamesh Sonpatki*
643
0c070ae @rafaelfranca Merge pull request #18251 from tjgrathwell/fix-polymorphic-routes-to-…
rafaelfranca authored
644 * Fix how polymorphic routes works with objects that implement `to_model`.
645
646 *Travis Grathwell*
647
afe402d @senny unify CHANGELOG format. [ci skip]
senny authored
648 * Stop converting empty arrays in `params` to `nil`.
8f8ccb9 @Sinjo Don't convert empty arrays to nils when deep munging params
Sinjo authored
649
0750330 @karanarora Spelling/typo/grammatical fixes [ci skip]
karanarora authored
650 This behavior was introduced in response to CVE-2012-2660, CVE-2012-2694
8f8ccb9 @Sinjo Don't convert empty arrays to nils when deep munging params
Sinjo authored
651 and CVE-2013-0155
652
653 ActiveRecord now issues a safe query when passing an empty array into
654 a where clause, so there is no longer a need to defend against this type
655 of input (any nils are still stripped from the array).
656
657 *Chris Sinjakli*
658
0587070 @senny cleanup CHANGELOGs. [ci skip]
senny authored
659 * Fixed usage of optional scopes in url helpers.
a842c5c @agrobbin allow URL helpers to work with optional scopes
agrobbin authored
660
661 *Alex Robbin*
662
0587070 @senny cleanup CHANGELOGs. [ci skip]
senny authored
663 * Fixed handling of positional url helper arguments when `format: false`.
1a50be8 @binaryberry Fix handling of positional url helper arguments when format is false
binaryberry authored
664
665 Fixes #17819.
666
667 *Andrew White*, *Tatiana Soukiassian*
668
f25ad07 @rafaelfranca Start Rails 5 development :tada:
rafaelfranca authored
669 Please check [4-2-stable](https://github.com/rails/rails/blob/4-2-stable/actionpack/CHANGELOG.md) for previous changes.
Something went wrong with that request. Please try again.