tenon 1.0.14 → 1.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 94a30cbe8ef9654ef0031fb20024f4a915cf50e3
4
- data.tar.gz: e62635330409537b8385f15ab0ebab3487ba7db1
3
+ metadata.gz: f1113d2e336c7bb39401c7000d5adf08482d2523
4
+ data.tar.gz: 502bfd2c4086090b8cb25a3fd66ac84240757ca3
5
5
  SHA512:
6
- metadata.gz: 358964d9fd8b31acc9897637be02f906eb918b4bd0196e3fa7c5d4fc94f4ad935139cba8d0a5430a76ae3cb4937ff4d211315a13e54e0a86257bae9323ad2460
7
- data.tar.gz: d136847f052d8ea4ca6350457110a441a5eca90a3f615932e3ca6fba849810ad0a4e12b20adfddd0a4d761ae91760111beda1e6b6f605f1efe1c4fc2d7e2eef3
6
+ metadata.gz: 206b38bca3565c932cd9ed1ca0c9877dc12989dfa558eca04e03c758d318477a925ffbd92d4b0aa1be648d5f32ae814b3ead53f83e7a5dd57e71ebe5fed12687
7
+ data.tar.gz: 51f8fb44d61453d1016138a075eb135cc9954cceffe188a0d8f8d6b874118b867a5133db7e332298549f2082a892881b1b4a0103defbfead4e2dfc418aae341f
@@ -21,13 +21,13 @@ module Tenon
21
21
  content += text
22
22
  opts[:class] ||= ''
23
23
  opts[:title] ||= text
24
- opts[:class] += " #{active_class(path)}"
24
+ opts[:class] += " #{active_class(path, opts[:active])}"
25
25
  link_to(content, path, opts)
26
26
  end
27
27
 
28
- def active_class(path)
28
+ def active_class(path, active)
29
29
  path = url_for(path).split('/')[0..2].join('/')[1..-1]
30
- 'active' if path == controller_path
30
+ 'active' if active || path == controller_path
31
31
  end
32
32
  end
33
33
  end
@@ -5,7 +5,7 @@
5
5
  = nav_item 'Asset Library', assets_path, 'picture-o'
6
6
  = nav_item 'Comments', comments_path, 'comment'
7
7
  = nav_item 'Pages', pages_path, 'file'
8
- = nav_item 'Posts', posts_path, 'file-text'
8
+ = nav_item 'Posts', posts_path, 'file-text', active: ['post_categories'].include?(controller_name)
9
9
  = nav_item 'Users', users_path, 'user'
10
10
  = nav_item 'Events', events_path, 'calendar'
11
11
  = nav_item 'Galleries', galleries_path, 'th'
data/lib/tenon/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tenon
2
- VERSION = '1.0.14'
2
+ VERSION = '1.0.15'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tenon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.14
4
+ version: 1.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - factor[e] design initiative