Class: User::Operation::SignUp

Inherits:
Trailblazer::Operation
  • Object
show all
Defined in:
app/concepts/morpho/user/operation/sign_up.rb

Instance Method Summary collapse

Instance Method Details

#not_saved(options) ⇒ Object



32
33
34
# File 'app/concepts/morpho/user/operation/sign_up.rb', line 32

def not_saved(options, **)
  options['error'] = :not_saved
end

#not_synced(options) ⇒ Object



28
29
30
# File 'app/concepts/morpho/user/operation/sign_up.rb', line 28

def not_synced(options, **)
  options['error'] = :not_synced
end

#not_valid(options) ⇒ Object



24
25
26
# File 'app/concepts/morpho/user/operation/sign_up.rb', line 24

def not_valid(options, **)
  options['error'] = :not_valid
end

#save(options) ⇒ Object



19
20
21
22
# File 'app/concepts/morpho/user/operation/sign_up.rb', line 19

def save (options, **)
  options['model'] = options['contract'].model
  options['model'].save
end

#sync(options) ⇒ Object



15
16
17
# File 'app/concepts/morpho/user/operation/sign_up.rb', line 15

def sync(options, **)
  options['contract'].sync
end

#validate(options) ⇒ Object



10
11
12
13
# File 'app/concepts/morpho/user/operation/sign_up.rb', line 10

def validate(options, **)
  options['contract'] = Morpho::User::Contract::SignUp.new(Morpho::User.new)
  options['contract'].validate(options['data'])
end