module DynamicMenu module InheritableMenus def get_current_menu path = Rails.root.join('app/menus') require path + "#{params[:controller]}/#{params[:action]}.rb" current_user ||= nil menu = "#{params[:action]}Menu".classify.constantize.new(current_user) return menu end end end