Class: Course::UserRegistrationService

Inherits:
Object
  • Object
show all
Defined in:
app/services/course/user_registration_service.rb

Instance Method Summary collapse

Instance Method Details

#register(registration) ⇒ Boolean

Registers the specified registration.

Parameters:

Returns:

  • (Boolean)

    True if the registration succeeded. False if the registration failed.


7
8
9
10
# File 'app/services/course/user_registration_service.rb', line 7

def register(registration)
  course_user = create_or_update_registration(registration)
  course_user.nil? ? false : course_user.persisted?
end