Class: Effective::CommitteeFile

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/effective/committee_file.rb

Instance Method Summary collapse

Instance Method Details

#parentsObject



55
56
57
58
# File 'app/models/effective/committee_file.rb', line 55

def parents
  return [] if committee_folder.blank?
  committee_folder.parents + [committee_folder]
end

#to_sObject



51
52
53
# File 'app/models/effective/committee_file.rb', line 51

def to_s
  title.presence || file&.filename.to_s.presence || 'file'
end