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

16 lines
385 B
Ruby
Raw Normal View History

class Color < PetAttribute
fetch_objects!
Basic = %w(blue green red yellow).map { |name| find_by_name(name) }
BasicIds = Basic.map(&:id)
2010-11-27 15:41:06 -08:00
def self.basic_ids
BasicIds
end
def self.nonstandard_ids
@nonstandard_ids ||= File.read(Rails.root.join('config', 'nonstandard_colors.txt')).
chomp.split("\n").map { |name| Color.find_by_name(name).id }
end
end