Class: Wobauth::AdUsersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/wobauth/ad_users_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_ability

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/wobauth/ad_users_controller.rb', line 5

def index
  if search_params.present?
	result = SearchAdUserService.new(search_params.to_h).call
	unless result.success?
	  flash[:error] = result.error_messages.join(", ")
	end
	@ad_users = result.ad_users
  else
	@ad_users = []
  end
  respond_with(@ad_users)
end