Sha256: 14db3cb8870cfb6fd2cf971efb3eeedd332e2671b3e566130a8d7efb57e1d242

Contents?: true

Size: 334 Bytes

Versions: 2

Compression:

Stored size: 334 Bytes

Contents

require_dependency 'landable/author'

module Landable
  class RegistrationService
    def self.call(attributes)
      author = Author.where(username: attributes[:username]).first
      if author
        author
      else
        Author.create!(attributes.slice(:username, :email, :first_name, :last_name))
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
landable-1.14.0 app/services/landable/registration_service.rb
landable-1.13.2 app/services/landable/registration_service.rb