Skip to content

Instantly share code, notes, and snippets.

@pote

pote/stuff.rb Secret

Created August 9, 2012 01:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save pote/5bb56ca8017d8c1189fb to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment