debian-mirror-gitlab/app/services/create_spam_log_service.rb
2016-04-02 18:10:28 +05:30

13 lines
337 B
Ruby

class CreateSpamLogService < BaseService
def initialize(project, user, params)
super(project, user, params)
end
def execute
spam_params = params.merge({ user_id: @current_user.id,
project_id: @project.id } )
spam_log = SpamLog.new(spam_params)
spam_log.save
spam_log
end
end