Sha256: 41e787029d6ee646c4985cae1ce43aba9ab3a2fd9dcde6d54ce222f214aeb0d5

Contents?: true

Size: 287 Bytes

Versions: 1

Compression:

Stored size: 287 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dynamic_menu-3.0.0.pre1 lib/dynamic_menu/inheritable_menus.rb