secret
Created

  • Download Gist
stuff.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12
class UserCreationService
def initialize(user_klass = User, log_klass = Log)
@user_klass = user_klass
@log_klass = log_klass
end
 
def create(params)
@user_klass.create(params).tap do |u|
@log_klass.new_user(u)
end
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.