diff --git a/app/models/alt_style.rb b/app/models/alt_style.rb index 3aedd61f..23386ddc 100644 --- a/app/models/alt_style.rb +++ b/app/models/alt_style.rb @@ -19,4 +19,11 @@ class AltStyle < ApplicationRecord SwfAsset.from_biology_data(self.body_id, asset_data) end end + + # For convenience in the console! + def self.find_by_name(color_name, species_name) + color = Color.find_by_name(color_name) + species = Species.find_by_name(species_name) + where(color_id: color, species_id: species).first + end end