Sha256: 41d78b530fe100354dd30d9306032406e0bab4cb7ee053c04292a382205960e9
Contents?: true
Size: 448 Bytes
Versions: 56
Compression:
Stored size: 448 Bytes
Contents
module ForestLiana class BelongsToUpdater def initialize(resource, association, params) @resource = resource @association = association @params = params @data = params['data'] end def perform @record = @resource.find(@params[:id]) new_value = @association.klass.find(@data[:id]) if @data && @data[:id] @record.send("#{@association.name}=", new_value) @record.save() end end end
Version data entries
56 entries across 56 versions & 1 rubygems