Sha256: ef86f2b0408dc549567fadb1e77a6ae892bf988d745efad5fb92701a625331e8

Contents?: true

Size: 528 Bytes

Versions: 1

Compression:

Stored size: 528 Bytes

Contents

class SimpleReport

  include Datagrid


  scope do
    ::Entry.includes(:group).order("entries.created_at")
  end

  filter(:group_id, :integer, :multiple => true)
  filter(:category, :enum, :select => ["first", "second"])
  filter(:disabled, :eboolean)
  filter(:confirmed, :boolean)
  filter(:name) do |value|
    self.scoped(:conditions => {:name => value})
  end

  column(:group, :order => "groups.name") do
    self.group.name
  end

  column(:name) do |user|
    user.name
  end

  def param_name
    :report
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
datagrid-0.1.0 spec/support/simple_report.rb