Class: LesliBabel::ModuleService
- Inherits:
-
Lesli::ApplicationLesliService
- Object
- Lesli::ApplicationLesliService
- LesliBabel::ModuleService
- Defined in:
- app/services/lesli_babel/module_service.rb
Instance Method Summary collapse
Instance Method Details
#list ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/services/lesli_babel/module_service.rb', line 4 def list # get the list of installed engines, including: rails_core, rails_builder, rails_engine babel_modules_names = Lesli::System.engines.map { |engine, engine_info| engine_info[:code] } # get list of ids of installed engines and available third-party apps Module .where(:code => babel_modules_names) # -> only installed engines #.or(Module.where.not(:platform => ["rails_core", "rails_builder", "rails_engine"])) .map { |engine| engine.id } end |