summaryrefslogtreecommitdiffstats
path: root/extra/sample_plugin/app/models/meeting.rb
blob: 34310647ce7aaf3a63d0d1a9d0f22a927d55d756 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
class Meeting < ApplicationRecord
  belongs_to :project

  acts_as_event :title => Proc.new {|o| "#{o.scheduled_on} Meeting"},
                :datetime => :scheduled_on,
                :author => nil,
                :url => Proc.new {|o| {:controller => 'meetings', :action => 'show', :id => o.id}}

  acts_as_activity_provider :timestamp => 'scheduled_on',
                            :scope => proc { joins(:project) },
                            :permission => nil
end