app/services/landable/registration_service.rb in landable-1.13.1 vs app/services/landable/registration_service.rb in landable-1.13.2
- old
+ new
@@ -1,10 +1,11 @@
-require_dependency "landable/author"
+require_dependency 'landable/author'
module Landable
class RegistrationService
def self.call(attributes)
- if author = Author.where(username: attributes[:username]).first
+ author = Author.where(username: attributes[:username]).first
+ if author
author
else
Author.create!(attributes.slice(:username, :email, :first_name, :last_name))
end
end