Module: SidebarHelper
- Defined in:
- app/helpers/sidebar_helper.rb
Instance Method Summary collapse
Instance Method Details
#active_li?(options = {}) ⇒ Boolean
3 4 5 6 7 8 9 10 11 12 13 |
# File 'app/helpers/sidebar_helper.rb', line 3 def active_li?( = {}) result = false return '' if [:controllers].blank? [:value] ||= '' unless [:actions].blank? result = true if [:controllers].include?(controller_name) and [:actions].include?(action_name) else result = true if [:controllers].include?(controller_name) end result = "#{[:value]}" if result.present? end |