Method: CustomTable::ApplicationHelper#custom_table_batch_ids

Defined in:
app/helpers/custom_table/application_helper.rb

#custom_table_batch_ids(items) ⇒ Object



501
502
503
504
505
506
507
508
509
510
# File 'app/helpers/custom_table/application_helper.rb', line 501

def custom_table_batch_ids items
  return if items.nil? || items.length == 0
  capture do
    items.each do |item|
      concat hidden_field_tag("#{item.model_name.plural}[]", item.id)
    end
    concat (:p, t("custom_table.batch_selected_items_count", count: items.length))
    concat (:p, t("custom_table.batch_action_description"))
  end
end