Sha256: bfdb6461d9d644ff90baeaa5d375f824c45ef5adce7f27b92871b427b9173b45

Contents?: true

Size: 430 Bytes

Versions: 1

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

# Extensions
class RowsExtController < RowsController
  def copy
    set_resource
    @_resource = resource.dup
    resource.id = nil
    respond_to do |format|
      format.html { render action: :new }
    end
  end

  def multi_deletion
    items = params[:multi_tick] || []
    items -= [""]
    items.map { |id| model_class.find_by_id(id.to_i).destroy }
    redirect_to action: :index
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rows_controller-3.1.0 app/controllers/rows_ext_controller.rb.bak