Skip to content

Instantly share code, notes, and snippets.

@jarinudom
Created August 11, 2009 23:46
Show Gist options
  • Save jarinudom/166191 to your computer and use it in GitHub Desktop.
Save jarinudom/166191 to your computer and use it in GitHub Desktop.
# users/index
def index
if current_user
@search = User.visible.without_user(current_user).search(params[:search])
else
@search = User.visible.search(params[:search])
end
@users = @search.paginate(:order => 'last_request_at DESC',
:page => params[:page])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment