1
0
Fork 0
forked from OpenNeo/impress
impress/app/models/species.rb

10 lines
231 B
Ruby
Raw Normal View History

class Species < PetAttribute
fetch_objects!
def self.require_by_name(name)
species = Species.find_by_name(name)
raise ArgumentError, "Species \"#{name.humanize}\" does not exist" unless species
species
end
end