Sha256: 2f6160f28938b9799a4a83b32de444f5a40c25372b22bae3b21d050eedff433c
Contents?: true
Size: 718 Bytes
Versions: 25
Compression:
Stored size: 718 Bytes
Contents
module LayoutsHelper def current_header_icon_class type current_header_icon?(type) ? 'active' : '' end def current_header_icon? type controllers = case type when :home 'home' when :contacts 'contacts' when :events 'events' when :resources 'repositories' when :messages [ 'messages', 'conversations' ] end Array.wrap(controllers).include? controller.controller_name end # Sets "out" class to header_signed_out in frontpage and devise's controllers # and "in" class in the rest of the application def header_logo_class controller.controller_path =~ /frontpage|devise/ ? 'out' : 'in' end end
Version data entries
25 entries across 25 versions & 2 rubygems