5 6 7 8 9 10 11 12
# File 'app/services/landable/registration_service.rb', line 5 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