Sha256: 56200bf396b8f16df6352b82a3b9834596b7945a6e37fd9bdf8268af75b9888b
Contents?: true
Size: 451 Bytes
Versions: 8
Compression:
Stored size: 451 Bytes
Contents
module SmallCage module MenuHelper def menu_active(name) p = @obj["menu_path"] p ||= @obj["uri"] return p =~ %r{^/#{name}/} ? "active" : "inactive" end def menu_active_rex(rex) p = @obj["menu_path"] p ||= @obj["uri"] return p =~ rex ? "active" : "inactive" end def topic_dirs result = @obj["dirs"].dup result.reject! {|d| d["topic"].nil? } return result end end end
Version data entries
8 entries across 8 versions & 1 rubygems