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