aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #13999 from jamox/update_rackAaron Patterson2014-07-082-12/+11
|\ | | | | This updates rails to use edge rack
| * Since upgrading rack we can remove unnecessary string encodingsJarmo Isotalo2014-05-191-9/+2
| | | | | | | | https://github.com/rack/rack/commit/5a5aee36
| * Upgraded rackJarmo Isotalo2014-05-191-3/+9
| | | | | | | | | | | | | | | | As Rack has some non backwards compatible changes added required modifications to keep behaviour in rails close to same as before. Also modified generators to include rack/rack for not yet released version of rack
* | remove the mounted_helpers respond_to checkAaron Patterson2014-07-071-1/+1
| | | | | | | | It always responds to mounted_helpers now
* | always test against a routed rack app so there are always url_helpersAaron Patterson2014-07-071-1/+1
| |
* | Generate shallow paths for all children of shallow resources.Seb Jacobs2014-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this commit shallow resources would only generate paths for non-direct children (with a nested depth greater than 1). Take the following routes file. resources :blogs do resources :posts, shallow: true do resources :comments do resources :tags end end end This would generate shallow paths for `tags` nested under `posts`, e.g `/posts/:id/tags/`, however it would not generate shallow paths for `comments` nested under `posts`, e.g `/posts/:id/comments/new`. This commit changes the behaviour of the route mapper so that it generate paths for direct children of shallow resources, for example if you take the previous routes file, this will now generate shallow paths for `comments` nested under `posts`, .e.g `posts/:id/comments/new`. This was the behaviour in Rails `4.0.4` however this was broken in @jcoglan's fix for another routes related issue[1]. This also fixes an issue[2] reported by @smdern. [1] https://github.com/rails/rails/commit/d0e5963 [2] https://github.com/rails/rails/issues/15783
* | Merge pull request #16013 from tgxworld/remove_symbolized_path_parametersRafael Mendonça França2014-07-042-4/+5
|\ \ | | | | | | Remove symbolized_path_parameters.
| * | Remove symbolized_path_parameters.Guo Xiang Tan2014-07-022-4/+5
| | | | | | | | | | | | This pull request is a continuation of https://github.com/rails/rails/commit/925bd975 and https://github.com/rails/rails/commit/8d8ebe3d.
* | | [ci skip] /javascript/ -> JavaScript - cover whole appAkshay Vishnoi2014-07-041-1/+1
|/ /
* | flash doesn't pass objects #15522 [ci skip]Nishant Modak2014-07-011-3/+6
| |
* | makes it sound less misleadingShunsukeAida2014-07-021-2/+2
| |
* | Fix doc unwanted dl Admin:: [ci skip]Ciro Santilli2014-07-011-1/+1
| |
* | push host / port / protocol extraction upAaron Patterson2014-06-301-6/+6
| | | | | | | | Then we only need to extract host once.
* | Replace x.sort_by!.select! with x.select!.sort_by!Viktar Basharymau2014-06-201-1/+2
| | | | | | | | | | | | | | | | | | The latter has the same speed as the former in the worst case and faster in general, because it is always better to sort less items. Unfortunately, `routes.select!{...}.sort_by!{...}` is not possible here because `select!` returns `nil`, so select! and sort! must be done in two steps.
* | add both branches to the only_path conditionalAaron Patterson2014-06-191-6/+6
| |
* | Merge pull request #15744 from mmozuras/special_keys_setYves Senn2014-06-161-1/+1
|\ \ | | | | | | Change Http::Cache::SPECIAL_KEYS from Array to Set
| * | Change Http::Cache::SPECIAL_KEYS from Array to SetMindaugas Mozūras2014-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slightly improves performance, for example, a simple benchmark: ```ruby require 'benchmark/ips' require 'set' SPECIAL_KEYS = %w[extras no-cache max-age public must-revalidate] SPECIAL_KEYS_SET = Set.new(SPECIAL_KEYS) directive = 'must-revalidate' Benchmark.ips do |x| x.report('array') { SPECIAL_KEYS.include?(directive) } x.report('set') { SPECIAL_KEYS_SET.include?(directive) } end ``` Output: ``` ------------------------------------- array 67926 i/100ms set 74054 i/100ms ------------------------------------- array 2318423.4 (±2.8%) i/s - 11615346 in 5.014899s set 3387981.8 (±4.7%) i/s - 16958366 in 5.019355s ```
* | | Merge pull request #15743 from tgxworld/remove_unused_parametersYves Senn2014-06-161-1/+1
|\ \ \ | | | | | | | | Remove unused parameter.
| * | | Remove unused parameter.Guo Xiang Tan2014-06-151-1/+1
| |/ /
* / / Remove unused param 'separators' from RouteSet#build_pathMindaugas Mozūras2014-06-151-2/+2
|/ /
* | Fix request's path_info when a rack app mounted at '/'.Larry Lv2014-06-141-0/+1
| | | | | | | | Fixes issue #15511.
* | only check named_host? once in normalize_hostAaron Patterson2014-06-121-3/+7
| |
* | lookup subdomain from the options hash once, defaulting to trueAaron Patterson2014-06-121-2/+2
| | | | | | | | | | if the subdomain wasn't specified, it's the same as if specifying :subdomain as `true`, so we can default the value to `true` safely.
* | only extract domain from the options hash onceAaron Patterson2014-06-121-3/+4
| |
* | reduce calls to `named_host?`Aaron Patterson2014-06-121-2/+6
| | | | | | | | | | `normalize_host` already calls `named_host?`, so there is no reason to test `named_host?` again in the `extract_domain` method.
* | Removed warning actionpack url.rbJuanito Fatas2014-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | Before: /Users/Juan/dev/rails/actionpack/lib/action_dispatch/http/url.rb:95: warning: shadowing outer local variable - port After: No warning
* | remove useless to_param callAaron Patterson2014-06-111-1/+1
| | | | | | | | | | extract_subdomain always returns a string, and to_param calls to_s on a string
* | only look up the subdomain onceAaron Patterson2014-06-111-3/+4
| |
* | scheme should contain one or more charactersAaron Patterson2014-06-111-1/+1
| |
* | pull the port out of the options hash onceAaron Patterson2014-06-111-2/+3
| |
* | remove useless nil checkAaron Patterson2014-06-111-2/+2
| | | | | | | | | | | | | | | | | | irb(main):004:0> /foo/ !~ nil => true irb(main):005:0> /foo/ !~ 'bar' => true irb(main):006:0> /foo/ !~ 'foo' => false
* | these methods are always called with a tld_parameterAaron Patterson2014-06-111-3/+3
| | | | | | | | | | remove the default parameter since the methods are always called with a parameter
* | rm `same_host?`. The same conditional is two lines down.Aaron Patterson2014-06-111-5/+3
| |
* | Revert "rm `same_host?`. The same conditional is two lines down."Aaron Patterson2014-06-111-5/+8
| | | | | | | | This reverts commit 79469b4b0c05a50e19699bc9b568042add2d4987.
* | rm `same_host?`. The same conditional is two lines down.Aaron Patterson2014-06-111-8/+5
| |
* | cache host on the stack so we only look it up onceAaron Patterson2014-06-111-8/+9
| |
* | only pull :protocol from the options hash onceAaron Patterson2014-06-111-2/+3
| |
* | cache protocol on the stack to reduce options hash lookupsAaron Patterson2014-06-111-7/+7
| |
* | eliminate nil checks in normalize_portAaron Patterson2014-06-111-7/+7
| |
* | reduce hash lookups and disconnect normalize_port from the options hashAaron Patterson2014-06-111-9/+9
| |
* | Handle client disconnect during live streamingMatthew Draper2014-06-081-13/+47
| | | | | | | | .. even when the producer is blocked for a write.
* | [ci skip] Fix capitalizationAkshay Vishnoi2014-06-071-2/+2
| |
* | remove another wasteful AS::SafeBuffer allocationAaron Patterson2014-06-061-1/+1
| |
* | Use a frozen Set instance for CGI_VARIABLES.Nathaniel Bibler2014-06-051-8/+21
| | | | | | Also expand the CGI_VARIABLE name listing to multiple lines for cleaner diffs and legibility.
* | Merge branch 'master' of github.com:rails/railsAaron Patterson2014-06-042-3/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of github.com:rails/rails: For our build, stick with mail 2.5.x for now Correct result, previously showing wrong result Collapse PG default extractoin of most types to single regex Change wording of explanation about precision & scale of decimal numbers [ci skip] Cleaned up duplicated CHANGELOG entry [ci skip] reuse available belongs_to? method Convert StrongParameters cache to a hash. This fixes an unbounded memory leak demonstrated on @tenderlove's latest blog post: Partially revert deprecation of *_filter Pluralize params Add default_i18n_subject to the guides Fix regression on eager loading association based on SQL query rather than existing column. Relax mail gem constraint from ~> 2.5.4 to ~> 2.5, >= 2.5.4 Keep column defaults in type cast form Return a null column when no column exists for an attribute Refactor XML serializer to not depend on `serialized_attributes` Test the serialized types of virtual columns in XML implement ActiveRecord::Base#pretty_print + changelog Remove duplicated HashWithIndifferentAccess#with_indifferent_access.
| * \ Merge pull request #15349 from tgxworld/remove_duplicated_method_callRafael Mendonça França2014-06-032-3/+2
| |\ \ | | | | | | | | Remove duplicated HashWithIndifferentAccess#with_indifferent_access.
| | * | Remove duplicated HashWithIndifferentAccess#with_indifferent_access.Guo Xiang Tan2014-05-262-3/+2
| | | |
* | | | push splitting "to" up the callstackAaron Patterson2014-06-031-15/+20
|/ / /
* | | Routes specifying 'to:' must be a string that contains a "#" or a rackAaron Patterson2014-06-031-3/+21
| | | | | | | | | | | | | | | application. Use of a symbol should be replaced with `action: symbol`. Use of a string without a "#" should be replaced with `controller: string`.
* | | push some options munging to an alternate constructorAaron Patterson2014-06-031-13/+19
| | |