Sha256: 98cbdd7ce3d63b2e5bd497ea7eba905a9607dd6bfca4e868014b39656de998e6

Contents?: true

Size: 488 Bytes

Versions: 2

Compression:

Stored size: 488 Bytes

Contents

class Admin::EffectivePollsDatatable < Effective::Datatable
  filters do
    scope :upcoming
    scope :available
    scope :completed
    scope :all
  end

  datatable do
    order :start_at, :desc

    col :id, visible: false
    col :created_at, visible: false
    col :updated_at, visible: false

    col :title
    col :start_at
    col :end_at
    col :audience

    col :poll_questions, visible: false

    actions_col
  end

  collection do
    Effective::Poll.all.deep
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
effective_polls-0.0.2 app/datatables/admin/effective_polls_datatable.rb
effective_polls-0.0.1 app/datatables/admin/effective_polls_datatable.rb