Module: Faalis::Generators::Concerns::Menu

Included in:
DashboardScaffold
Defined in:
lib/faalis/generators/concerns/menu.rb

Overview

This concern adds support of side menu to scaffold and menu key to jsonfile. menu key is an array which each element represent a menu entry and should be and object with following keys:

title: Title of submenu

url: Url of submenu link

action: Permissions related action to check on resource model.

model: Model of related resource which permission action should be check against.

Instance Method Summary (collapse)

Instance Method Details

- (Boolean) has_menu? (private)

Returns:

  • (Boolean)


20
21
22
# File 'lib/faalis/generators/concerns/menu.rb', line 20

def has_menu?
  resource_data.include? "menu"
end