Method: Alchemy::Ingredient.normalize_type
- Defined in:
- app/models/alchemy/ingredient.rb
.normalize_type(ingredient_type) ⇒ String
Modulize ingredient type
Makes sure the passed ingredient type is in the Alchemy::Ingredients module namespace.
If you add custom ingredient class, put them in the Alchemy::Ingredients module namespace
70 71 72 |
# File 'app/models/alchemy/ingredient.rb', line 70 def normalize_type(ingredient_type) "Alchemy::Ingredients::#{ingredient_type.to_s.classify.demodulize}" end |