Merge pull request #890 from inobCR/iss655

Ordenar admin/organizaciones por orden de llegada
This commit is contained in:
Enrique García
2016-02-16 11:26:29 +01:00

View File

@@ -5,11 +5,16 @@ class Admin::OrganizationsController < Admin::BaseController
def index
@organizations = @organizations.send(@current_filter)
@organizations = @organizations.includes(:user).order(:name, 'users.email').page(params[:page])
@organizations = @organizations.includes(:user)
.order('users.created_at', :name, 'users.email')
.page(params[:page])
end
def search
@organizations = Organization.includes(:user).search(params[:term]).page(params[:page])
@organizations = Organization.includes(:user)
.search(params[:term])
.order('users.created_at', :name, 'users.email')
.page(params[:page])
end
def verify