Method: Caselaw::Jurisdiction.get_by_id

Defined in:
lib/caselaw/jurisdiction.rb

.get_by_id(id) ⇒ Object



84
85
86
87
88
# File 'lib/caselaw/jurisdiction.rb', line 84

def self.get_by_id(id)
  jurisdiction = all.find { |j| j.id == id }
  fail(Caselaw::NotFound, "Jurisdiciton not found, please check id referenced.") if jurisdiction.nil?
  jurisdiction.slug
end