Skip to content

Commit 0c1d9fa

Browse files
committed
Added bill field to agenda_item.
1 parent e154757 commit 0c1d9fa

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

app/api/v0/entities.rb

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ class AgendaItems < Grape::Entity
100100
expose :subjects
101101
expose :classification
102102
expose :event_related_entities, as: :related_entities, using: EventRelatedEntities
103+
expose :bill
103104
end
104105

105106
class EventParticipants < Grape::Entity

app/models/agenda_item.rb

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ class AgendaItem < ActiveRecord::Base
88
belongs_to :event
99
has_many :event_related_entities
1010

11+
def bill
12+
self.event_related_entities[0]
13+
end
14+
1115
def self.votable
1216
self.where.contains(classification: ['action'])
1317
end

0 commit comments

Comments
 (0)