parent
daff87ab5d
commit
16b3bbd15a
1 changed files with 5 additions and 4 deletions
|
|
@ -21,13 +21,14 @@ class Subject < ActiveRecord::Base
|
||||||
statements.map(&:public_figure).flatten
|
statements.map(&:public_figure).flatten
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class << self
|
||||||
|
|
||||||
|
def latest_associated_public_figures
|
||||||
|
associated_public_figures.order(id: :desc).limit(5)
|
||||||
|
end
|
||||||
|
|
||||||
def latest_associated_public_figures
|
|
||||||
statements.map(&:public_figure).flatten.order(id: :desc).limit(5)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_positions_for_public_figure(public_figure)
|
def get_positions_for_public_figure(public_figure)
|
||||||
#TODO performance optimization
|
#TODO performance optimization
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue