Module: VoluntarySurvey::Navigation

Defined in:
lib/voluntary_survey/navigation.rb

Class Method Summary collapse

Class Method Details

.voluntary_menu_customizationObject



3
4
5
6
7
8
9
# File 'lib/voluntary_survey/navigation.rb', line 3

def self.voluntary_menu_customization
  voluntary_menu_options.each do |resource, options|
    options.each do |option, value|
      ::Voluntary::Navigation::Base.add_menu_option(resource, option, value)
    end
  end
end

.voluntary_menu_optionsObject



11
12
13
14
15
16
17
18
19
# File 'lib/voluntary_survey/navigation.rb', line 11

def self.voluntary_menu_options
  {
    projects: {
      stories_after_resource_has_many: Proc.new do |story, options|
        story.item :results, I18n.t('survey_results.index.title'), story_results_path(@story)  
      end
    }
  }
end