Use keyword arguments for ApplicationService calls
Not all services are using keywords, which breaks those calls in Ruby 3
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
class CreateAccount < ApplicationService
|
||||
def initialize(args)
|
||||
@username = args[:username]
|
||||
@domain = args[:ou] || Setting.primary_domain
|
||||
@email = args[:email]
|
||||
@password = args[:password]
|
||||
@invitation = args[:invitation]
|
||||
@confirmed = args[:confirmed]
|
||||
def initialize(account:)
|
||||
@username = account[:username]
|
||||
@domain = account[:ou] || Setting.primary_domain
|
||||
@email = account[:email]
|
||||
@password = account[:password]
|
||||
@invitation = account[:invitation]
|
||||
@confirmed = account[:confirmed]
|
||||
end
|
||||
|
||||
def call
|
||||
|
||||
Reference in New Issue
Block a user