module Cabot::Update

PUT

Public Class Methods

call(model, current_user = {}, options = {}) click to toggle source
# File lib/cabot.rb, line 47
def self.call(model, current_user = {}, options = {})
  object = model.to_s.camelize.constantize
  params = Cabot::Parameters::Update.send(model)
  options.each do |key, value|
    params[key] = value
  end

  Factory.new(object::Update.(params, current_user: current_user))
end