Fix for user order
This commit is contained in:
parent
9186978551
commit
dfec6f7642
|
@ -261,7 +261,7 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
|
||||||
if to_go > 0
|
if to_go > 0
|
||||||
user_at_position = User.where(position: to_go - 1).first
|
user_at_position = User.where(position: to_go - 1).first
|
||||||
user = User.find(pair[1])
|
user = User.find(pair[1])
|
||||||
if user_at_position && !user_at_position == user
|
if user_at_position && !(user_at_position == user)
|
||||||
if user.position > user_at_position.position
|
if user.position > user_at_position.position
|
||||||
user.move_above(user_at_position)
|
user.move_above(user_at_position)
|
||||||
else
|
else
|
||||||
|
|
Reference in New Issue