Class: Avo::Tools::ToolManager
- Inherits:
-
Object
- Object
- Avo::Tools::ToolManager
- Defined in:
- lib/avo/tools/tool_manager.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#get_sidebar_partials ⇒ Object
Insert any partials that we find in app/views/avo/sidebar/items.
- #tools_for_navigation ⇒ Object
Class Method Details
.build ⇒ Object
5 6 7 |
# File 'lib/avo/tools/tool_manager.rb', line 5 def build new end |
Instance Method Details
#get_sidebar_partials ⇒ Object
Insert any partials that we find in app/views/avo/sidebar/items.
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/avo/tools/tool_manager.rb', line 11 def Dir.glob(Rails.root.join("app", "views", "avo", "sidebar", "items", "*.html.erb")) .map do |path| File.basename path end .map do |filename| # remove the leading underscore (_) filename[0] = "" # remove the extension filename.gsub!(".html.erb", "") filename end end |
#tools_for_navigation ⇒ Object
25 26 27 |
# File 'lib/avo/tools/tool_manager.rb', line 25 def end |