diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-19 16:00:55 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-19 16:00:55 +0000 |
commit | 8b723776ac98dc84d4e0f93302602e3949fda5c6 (patch) | |
tree | 2838af570affc7918e4790a2d89d087a17e25c81 /app/models/commit_range.rb | |
parent | 479cf8927029f911b998091d8279612ff0cbfcef (diff) | |
parent | 9487c3703757ba013923125c4fe7774b9cea6f9b (diff) | |
download | gitlab-ce-8b723776ac98dc84d4e0f93302602e3949fda5c6.tar.gz |
Merge branch 'fix_trigger_search' into 'master'
Only trigger search if search string is present
This is a follow up for !296 to prevent the search function from being executed while the query is nil.
Problem was this:
When the search is called, the search controller gets 2 requests.
```
{"action"=>"show", "controller"=>"search"}
```
and
```
{"utf8"=>"✓",
"search"=>"proj",
"project_id"=>"",
"group_id"=>"",
"snippets"=>"",
"scope"=>"",
"button"=>"",
"action"=>"show",
"controller"=>"search"}
```
Obviously it doesn't make sense to execute the search for the first request, since that one doesn't have a scope or a search string.
Please review this carefully since this modifies the search and may break things i can't think of.
@dzaporozhets While this fixes the root cause for the failing test, I think we should keep your fix in as a failsafe. What do you think of this?
See merge request !302
Diffstat (limited to 'app/models/commit_range.rb')
0 files changed, 0 insertions, 0 deletions