diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-13 08:38:35 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-13 08:38:35 +0000 |
commit | dc7569ecaef63a8b31d8695d3bdad9741161ae32 (patch) | |
tree | 193edd0a3b016c3a31f4f39881a03053ffe48eb5 | |
parent | 7c9783200286740bc9e9ac3d3c227e0b26ccdb17 (diff) | |
download | redmine-dc7569ecaef63a8b31d8695d3bdad9741161ae32.tar.gz redmine-dc7569ecaef63a8b31d8695d3bdad9741161ae32.zip |
Fixed that group filter is escaped on users index.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9679 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/users/index.html.erb | 2 | ||||
-rw-r--r-- | test/functional/users_controller_test.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index d23be4ad2..d59617941 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -11,7 +11,7 @@ <% if @groups.present? %> <label for='group_id'><%= l(:label_group) %>:</label> -<%= select_tag 'group_id', '<option></option>' + options_from_collection_for_select(@groups, :id, :name, params[:group_id].to_i), :onchange => "this.form.submit(); return false;" %> +<%= select_tag 'group_id', content_tag('option') + options_from_collection_for_select(@groups, :id, :name, params[:group_id].to_i), :onchange => "this.form.submit(); return false;" %> <% end %> <label for='name'><%= l(:label_user) %>:</label> diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index f92bd44f0..0faaf03ae 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -74,6 +74,9 @@ class UsersControllerTest < ActionController::TestCase users = assigns(:users) assert users.any? assert_equal([], (users - Group.find(10).users)) + assert_select 'select[name=group_id]' do + assert_select 'option[value=10][selected=selected]' + end end def test_show |