Sha256: fa4c477bae77657470a985702d534ba43de1c2df1ba4e4b648e98ce68522d53b
Contents?: true
Size: 1008 Bytes
Versions: 12
Compression:
Stored size: 1008 Bytes
Contents
module Admin class EffectiveEventRegistrantsDatatable < Effective::Datatable datatable do col :updated_at, visible: false col :created_at, visible: false col :id, visible: false col :event col :owner, visible: false col :event_registration, visible: false if attributes[:event_id] col :event_ticket, search: Effective::EventTicket.where(event: event).all else col :event_ticket, search: :string end col :purchased_order col :first_name col :last_name col :email col :company col :number col :notes, label: 'Restrictions and notes' actions_col end collection do scope = Effective::EventRegistrant.deep.purchased if attributes[:event_id].present? scope = scope.where(event: event) end scope end def event @event ||= if attributes[:event_id] Effective::Event.find(attributes[:event_id]) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems