Method: Alchemy::Element::ElementIngredients#richtext_ingredients_ids
- Defined in:
- app/models/alchemy/element/element_ingredients.rb
#richtext_ingredients_ids ⇒ Object
Returns an array of all Richtext ingredients ids from elements
This is used to re-initialize the TinyMCE editor in the element editor.
73 74 75 76 77 78 79 80 |
# File 'app/models/alchemy/element/element_ingredients.rb', line 73 def richtext_ingredients_ids ids = ingredients.select(&:has_tinymce?).collect(&:id) = nested_elements. if .present? ids += .collect(&:richtext_ingredients_ids) end ids.flatten end |