Sha256: 59a2318d16eedca2820ce2f25fc09ae54777942969e8d90ac4626d4f9dedc930

Contents?: true

Size: 976 Bytes

Versions: 3

Compression:

Stored size: 976 Bytes

Contents

class ProductsController < ApplicationController

  def simple_index
    begin
      tabulatr_for Product
    rescue Exception => e
      puts e.backtrace
      raise e
    end
  end

  def one_item_per_page_with_pagination
    @pagination = true
    tabulatr_for Product, render_action: 'one_item_per_page'
  end

  def one_item_per_page_without_pagination
    @pagination = false
    tabulatr_for Product, render_action: 'one_item_per_page'
  end

  def count_tags
    tabulatr_for Product
  end

  def stupid_array
    @products = Product.order('price asc').limit(11).to_a
  end

  def with_batch_actions
    begin
      tabulatr_for Product, render_action: 'with_batch_actions' do |batch_actions|
        batch_actions.destroy do |ids|
          ids.each do |id|
            Product.find(id).destroy
          end
        end
      end
    rescue Exception => e
      puts e.backtrace
      raise e
    end
  end

  def implicit_columns
    tabulatr_for Product
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tabulatr2-0.8.2 spec/dummy/app/controllers/products_controller.rb
tabulatr2-0.8.1 spec/dummy/app/controllers/products_controller.rb
tabulatr2-0.8.0 spec/dummy/app/controllers/products_controller.rb