Sha256: ec8a41780c71ff929814969112f5b40054ee69b1bf40ddaad127df2e1674205b
Contents?: true
Size: 545 Bytes
Versions: 24
Compression:
Stored size: 545 Bytes
Contents
module ForestLiana class ResourceUpdater attr_accessor :record def initialize(resource, params) @resource = resource @params = params end def perform @record = @resource.find(@params[:id]) if Rails::VERSION::MAJOR == 4 @record.update_attributes!(resource_params.permit!) else @record.update_attributes!(resource_params, without_protection: true) end end def resource_params ResourceDeserializer.new(@resource, @params[:resource]).perform end end end
Version data entries
24 entries across 24 versions & 1 rubygems