diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-13 18:16:23 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-02-13 18:16:23 +0400 |
commit | 67798492bc5409b5a596fa28022e1e6cdf5985e4 (patch) | |
tree | d1b91938675cc009198f85639a74738c01590691 /app/helpers/selects_helper.rb | |
parent | f0f88390c1309b0d5a8cead701477e21c2174f05 (diff) |
Add placeholder support for project_users_select_tag
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/selects_helper.rb')
-rw-r--r-- | app/helpers/selects_helper.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/selects_helper.rb b/app/helpers/selects_helper.rb index 0668a164809..a1fe4488ae9 100644 --- a/app/helpers/selects_helper.rb +++ b/app/helpers/selects_helper.rb @@ -13,7 +13,8 @@ module SelectsHelper css_class << "multiselect " if opts[:multiple] css_class << (opts[:class] || '') value = opts[:selected] || '' + placeholder = opts[:placeholder] || 'Select user' - hidden_field_tag(id, value, class: css_class) + hidden_field_tag(id, value, class: css_class, 'data-placeholder' => placeholder) end end |