class MailyHerald::Webui::MenuManager

Attributes

current_menu_item[RW]

Public Class Methods

items() click to toggle source
# File lib/maily_herald/webui/menu_manager.rb, line 44
def items
  @@items || setup
end

Private Class Methods

setup() click to toggle source
# File lib/maily_herald/webui/menu_manager.rb, line 50
def setup
  @items = [
    {:name => :dashboard, :title => :label_dashboard, :url => Proc.new{ root_path }},
    {:name => :lists, :title => :label_list_plural, :url => Proc.new{ lists_path }},
    {:name => :ad_hoc_mailings, :title => :label_ad_hoc_mailing_plural, :url => Proc.new{ ad_hoc_mailings_path }},
    {:name => :one_time_mailings, :title => :label_one_time_mailing_plural, :url => Proc.new{ one_time_mailings_path }},
    {:name => :periodical_mailings, :title => :label_periodical_mailing_plural, :url => Proc.new{ periodical_mailings_path }},
    {:name => :sequences, :title => :label_sequence_plural, :url => Proc.new{ sequences_path }},
  ]
end

Public Instance Methods

items() click to toggle source
# File lib/maily_herald/webui/menu_manager.rb, line 62
def items
  self.class.items
end