Module: SnFoil::Controller::Concerns::UpdateControllerConcern

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/sn_foil/controller/concerns/update_controller_concern.rb

Instance Method Summary collapse

Instance Method Details

#process_update(**options) ⇒ Object



28
29
30
# File 'lib/sn_foil/controller/concerns/update_controller_concern.rb', line 28

def process_update(**options)
  current_context(**options).update(**options)
end

#render_update(model, **options) ⇒ Object



32
33
34
# File 'lib/sn_foil/controller/concerns/update_controller_concern.rb', line 32

def render_update(model, **options)
  render_change(model, **options)
end

#setup_update(**options) ⇒ Object



24
25
26
# File 'lib/sn_foil/controller/concerns/update_controller_concern.rb', line 24

def setup_update(**options)
  setup_options(**options)
end

#update(**options) ⇒ Object



18
19
20
21
22
# File 'lib/sn_foil/controller/concerns/update_controller_concern.rb', line 18

def update(**options)
  options = setup_update(**options)
  model = process_update(**options)
  render_update(model, **options)
end