Sha256: 4bccd6669e4b46b73b93d08fcd79d69c62b8244635d10039562dc1ebf10181c4
Contents?: true
Size: 451 Bytes
Versions: 4
Compression:
Stored size: 451 Bytes
Contents
# Allows controllers to associate actions with tabs in the site navigation. # origin: RM module ApplicationController::NavigationTrait as_trait do before_filter :set_default_section DEFAULT_SECTIONS = { 'edit' => 'edit', 'update' => 'edit', 'show' => 'show', 'index' => 'index' } private def set_default_section DEFAULT_SECTIONS[action_name].andand.tap do |section| in_sections section end end end end
Version data entries
4 entries across 4 versions & 1 rubygems