Class: Hyrax::UsersController

Inherits:
ApplicationController
  • Object
show all
Includes:
Blacklight::SearchContext
Defined in:
app/controllers/hyrax/users_controller.rb

Direct Known Subclasses

Dashboard::ProfilesController

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
# File 'app/controllers/hyrax/users_controller.rb', line 8

def index
  @users = search(params[:uq])
end

#showObject

Display user profile



13
14
15
16
17
# File 'app/controllers/hyrax/users_controller.rb', line 13

def show
  user = ::User.from_url_component(params[:id])
  return redirect_to root_path, alert: "User '#{params[:id]}' does not exist" if user.nil?
  @presenter = Hyrax::UserProfilePresenter.new(user, current_ability)
end