Sha256: 320bb1d1870d7a234d1f0e7c7968654064575185eef7a02a2971946451ce6417

Contents?: true

Size: 400 Bytes

Versions: 7

Compression:

Stored size: 400 Bytes

Contents

require 'magic_grid/definition'
require 'magic_grid/html_grid'

module MagicGrid
  module Helpers
    def magic_grid(collection = nil, columns = nil, opts = {}, &block)
      grid_def = MagicGrid::Definition.new columns, collection, controller, opts
      html_grid = HtmlGrid.new grid_def, self, controller
      html_grid.render &block
    end

    ::ActionView::Base.send :include, self
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
magic_grid-0.12.6 lib/magic_grid/helpers.rb
magic_grid-0.12.5 lib/magic_grid/helpers.rb
magic_grid-0.12.4 lib/magic_grid/helpers.rb
magic_grid-0.12.3 lib/magic_grid/helpers.rb
magic_grid-0.12.2 lib/magic_grid/helpers.rb
magic_grid-0.12.1 lib/magic_grid/helpers.rb
magic_grid-0.12.0 lib/magic_grid/helpers.rb