получить список всех моделей с рельсов [дубликата]
This question already has an answer here:
Is there a way to get a collection of all the Models in your Rails app? 27 answersМне нужен список со всеми моделями (class_names), которые имеют шаблон & quot; Cube & quot; в конце.
пример:
все мои модели: ModelFoo, ModelBar, ModelBarCube, Mode2BarCube
Что мне нужно:
[«ModelBarCube», «Mode2BarCube»]