Some tests for users controller, and fixed users#index
This commit is contained in:
parent
adfa9cc871
commit
4955481f14
9 changed files with 84 additions and 10 deletions
|
|
@ -2,9 +2,7 @@ class Admin::UsersController < ApplicationController
|
|||
before_filter :verify_admin
|
||||
|
||||
def index
|
||||
@users = User.all(:joins => :person,
|
||||
:order => "people.last_name ASC",
|
||||
:select => "users.*,
|
||||
@users = User.joins(:person).order("people.last_name ASC").select("users.*,
|
||||
people.last_name AS last_name,
|
||||
people.first_name AS first_name,
|
||||
people.public_name AS public_name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue