lib/teamster/general_helper.rb in teamster-0.2.2 vs lib/teamster/general_helper.rb in teamster-0.3.0
- old
+ new
@@ -52,9 +52,19 @@
arr << ['/' + module_name.downcase, module_name] if mod.under_development?
end
end
end
+ def all_modules(shuffle = false)
+ all_modules = [].tap do |arr|
+ App.modules.each do |mod|
+ module_name = mod.to_s.split("::").last
+ arr << ['/' + module_name.downcase, module_name]
+ end
+ end
+ shuffle ? all_modules.shuffle : all_modules
+ end
+
def find_template(views, name, engine, &block)
App.views.each {|v| super(v, name, engine, &block)}
end
end
end