2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'app/services/api_maker/member_command_service.rb', line 2
def perform
ApiMaker::Configuration.profile(-> { "MemberCommand execute: #{model_class.name}##{command_name}" }) do
ability_name = command_name.to_sym
collection = model_class.accessible_by(@ability, ability_name).where(model_class.primary_key => ids)
constant.execute_in_thread!(
ability: ability,
api_maker_args: api_maker_args,
collection: collection,
commands: commands,
command_response: command_response,
controller: controller
)
succeed!
end
end
|