small refactoring

This commit is contained in:
Alexander Machehin 2012-11-13 20:29:59 +06:00
parent 21a32fba6c
commit 9c0ae23927
2 changed files with 3 additions and 3 deletions

View File

@ -38,9 +38,9 @@ class Groups::MembersController < Groups::BaseController
end
def add
@user = User.find_by_uname(params[:user_id])
@user = User.find_by_uname(params[:user_uname])
if !@user
flash[:error] = t("flash.collaborators.wrong_user", :uname => params[:user_id])
flash[:error] = t("flash.collaborators.wrong_user", :uname => params[:user_uname])
elsif parent.add_member(@user, params[:role])
flash[:notice] = t("flash.members.successfully_added")
else

View File

@ -25,7 +25,7 @@
.hr.top
= form_tag add_group_members_path(parent) do
.admin-search= autocomplete_field_tag 'user_id', params[:user_id], autocomplete_user_uname_autocompletes_path#, :id_element => '#member_id_field'
.admin-search= autocomplete_field_tag 'user_uname', params[:user_uname], autocomplete_user_uname_autocompletes_path
.admin-role
.lineForm= select_tag 'role', options_for_collaborators_roles_select
.both