Method: Keys::CreateService#initialize

Defined in:
app/services/keys/create_service.rb

#initialize(current_user, params = {}) ⇒ CreateService

Returns a new instance of CreateService.



7
8
9
10
11
12
13
# File 'app/services/keys/create_service.rb', line 7

def initialize(current_user, params = {})
  @current_user = current_user
  @params = params
  @ip_address = @params.delete(:ip_address)
  @user = params.delete(:user) || current_user
  @params[:organization] ||= user.organization
end