2010-05-16 12:44:32 -07:00
|
|
|
class Color < PetAttribute
|
|
|
|
fetch_objects!
|
2010-05-16 13:15:21 -07:00
|
|
|
|
|
|
|
Basic = %w(blue green red yellow).map { |name| find_by_name(name) }
|
2010-06-08 15:26:42 -07:00
|
|
|
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
|
2010-05-16 12:44:32 -07:00
|
|
|
end
|