Module: Faalis::Dashboard::Sections::Sidebar

Extended by:
ActiveSupport::Concern
Included in:
DSL
Defined in:
lib/faalis/dashboard/sections/sidebar.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary (collapse)

Instance Method Details

- (Object) setup_sidebar (protected)



10
11
12
13
14
# File 'lib/faalis/dashboard/sections/sidebar.rb', line 10

def setup_sidebar
  @sidebar = sidebar(t('dashboard')) do |sidebar|
    sidebar.faalis_entries
  end
end

Yields:

  • (sidebar)


18
19
20
21
22
23
24
# File 'lib/faalis/dashboard/sections/sidebar.rb', line 18

def sidebar(name, **options, &block)
  sidebar = Faalis::Dashboard::Models::Sidebar.new(name, **options)

  yield sidebar if block_given?

  sidebar
end