Fixed /admin/users
ArgumentError in Admin::UsersController#index wrong number of arguments (1 for 0) Rails 4 has depricated "all" method, now it's default behaviour
This commit is contained in:
parent
4e395a0d7a
commit
0eb82bb11f
1 changed files with 5 additions and 6 deletions
|
|
@ -2,14 +2,13 @@ class Admin::UsersController < ApplicationController
|
||||||
before_filter :verify_admin
|
before_filter :verify_admin
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@users = User.all(:joins => :person,
|
@users = User.select("users.*,
|
||||||
:order => "people.last_name ASC",
|
|
||||||
:select => "users.*,
|
|
||||||
people.last_name AS last_name,
|
people.last_name AS last_name,
|
||||||
people.first_name AS first_name,
|
people.first_name AS first_name,
|
||||||
people.public_name AS public_name,
|
people.public_name AS public_name,
|
||||||
people.email AS email")
|
people.email AS email").joins(:person).load.order("people.last_name ASC")
|
||||||
end
|
|
||||||
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
user = User.find(params[:id])
|
user = User.find(params[:id])
|
||||||
|
|
@ -28,4 +27,4 @@ class Admin::UsersController < ApplicationController
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue