diff options
author | Sean McGivern <sean@gitlab.com> | 2017-07-11 17:11:41 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-07-19 10:21:18 +0100 |
commit | b3a588bccaaa078a81e8ce322d75ee167f642e13 (patch) | |
tree | 1b17451bbca296708e4e70b0539ea0bc3085d6c1 /app/controllers | |
parent | c57ae83dcfaeff9c358b5f896202e04a86ad6ef3 (diff) | |
download | gitlab-ce-b3a588bccaaa078a81e8ce322d75ee167f642e13.tar.gz |
Fix issuable state caching
We were including controller params in the cache key, so the key for the header
didn't match the one for the list itself!
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/concerns/issuable_collections.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/concerns/issuable_collections.rb b/app/controllers/concerns/issuable_collections.rb index e18778cdf80..b43b2c5621f 100644 --- a/app/controllers/concerns/issuable_collections.rb +++ b/app/controllers/concerns/issuable_collections.rb @@ -32,10 +32,10 @@ module IssuableCollections def filter_params set_sort_order_from_cookie - set_default_scope set_default_state - @filter_params = params.dup + # Skip irrelevant Rails routing params + @filter_params = params.dup.except(:controller, :action, :namespace_id) @filter_params[:sort] ||= default_sort_order @sort = @filter_params[:sort] @@ -55,10 +55,6 @@ module IssuableCollections @filter_params end - def set_default_scope - params[:scope] = 'all' if params[:scope].blank? - end - def set_default_state params[:state] = 'opened' if params[:state].blank? end |