Sha256: 3a6ef9dfd1d3ee85571e4f5af24a0452cb948a484f6600c177ad16674f202bc9

Contents?: true

Size: 321 Bytes

Versions: 16

Compression:

Stored size: 321 Bytes

Contents

require_dependency "landable/author"

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
landable-1.13.1 app/services/landable/registration_service.rb
landable-1.12.3 app/services/landable/registration_service.rb
landable-1.12.2 app/services/landable/registration_service.rb
landable-1.12.1 app/services/landable/registration_service.rb
landable-1.11.1 app/services/landable/registration_service.rb
landable-1.11.0 app/services/landable/registration_service.rb
landable-1.10.0.rc2 app/services/landable/registration_service.rb
landable-1.10.0.rc1 app/services/landable/registration_service.rb
landable-1.9.2 app/services/landable/registration_service.rb
landable-1.9.1 app/services/landable/registration_service.rb
landable-1.9.0 app/services/landable/registration_service.rb
landable-1.9.0.rc2 app/services/landable/registration_service.rb
landable-1.9.0.rc1 app/services/landable/registration_service.rb
landable-1.8.0 app/services/landable/registration_service.rb
landable-1.7.1.rc1 app/services/landable/registration_service.rb
landable-1.7.0 app/services/landable/registration_service.rb