Class: Flexite::Entry::UpdateService

Inherits:
ActionService show all
Defined in:
app/services/flexite/entry/update_service.rb

Instance Method Summary collapse

Methods inherited from ActionService

inherited, #initialize

Constructor Details

This class inherits a constructor from Flexite::ActionService

Instance Method Details

#callObject



5
6
7
8
9
10
11
12
# File 'app/services/flexite/entry/update_service.rb', line 5

def call
  if @form.invalid?
    return failure
  end

  @form.type.constantize.update(@form.id, value: @form.value)
  success
end