diff options
author | Phil Hughes <me@iamphill.com> | 2016-07-19 10:05:38 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-07-20 10:48:02 +0100 |
commit | 47d8fb84d80d23432c9afea055da4c56ea749206 (patch) | |
tree | 27ae6c31b70e823a3a99a682190bb047e38f1537 /app/helpers/dropdowns_helper.rb | |
parent | c54d2a030ca9753282640e8247e4df6c250477fa (diff) | |
download | gitlab-ce-47d8fb84d80d23432c9afea055da4c56ea749206.tar.gz |
Uses the selected values from the controller not the params
Added tests for new merge requests from forked project & owned project
Diffstat (limited to 'app/helpers/dropdowns_helper.rb')
-rw-r--r-- | app/helpers/dropdowns_helper.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/helpers/dropdowns_helper.rb b/app/helpers/dropdowns_helper.rb index b48b218b6ec..81e0b6bb5ae 100644 --- a/app/helpers/dropdowns_helper.rb +++ b/app/helpers/dropdowns_helper.rb @@ -40,11 +40,7 @@ module DropdownsHelper end def dropdown_toggle(toggle_text, data_attr, options = {}) - default_label = if options[:data] - options[:data][:default_label] - else - '' - end + default_label = data_attr[:default_label] content_tag(:button, class: "dropdown-menu-toggle #{options[:toggle_class] if options.has_key?(:toggle_class)}", id: (options[:id] if options.has_key?(:id)), type: "button", data: data_attr) do output = content_tag(:span, toggle_text, class: "dropdown-toggle-text #{'is-default' if toggle_text == default_label}") output << icon('chevron-down') |