Commit e25e6960 authored by Rajendra Kadam's avatar Rajendra Kadam

Init user to current user when user is nil

parent 20e045b1
......@@ -3,8 +3,9 @@
module Keys
class CreateService < ::Keys::BaseService
def initialize(current_user, params = {})
@current_user, @params, @user = current_user, params, params.delete(:user)
@current_user, @params = current_user, params
@ip_address = @params.delete(:ip_address)
@user = params.delete(:user) || current_user
end
def execute
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment