rails_nav 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/rails_nav.rb +8 -9
  2. data/rails_nav.gemspec +1 -1
  3. metadata +4 -3
data/lib/rails_nav.rb CHANGED
@@ -6,7 +6,7 @@
6
6
  ##
7
7
  #
8
8
  def Nav.version()
9
- '2.3.0'
9
+ '2.4.0'
10
10
  end
11
11
 
12
12
  def Nav.dependencies
@@ -302,14 +302,6 @@
302
302
  super
303
303
  end
304
304
 
305
- def last?
306
- nav.last == self
307
- end
308
-
309
- def first?
310
- nav.first == self
311
- end
312
-
313
305
  def Link.default_active_pattern_for(content)
314
306
  path_info = Slug.for(content, :join => '_')
315
307
  %r/\b#{ path_info }\b/i
@@ -373,6 +365,13 @@
373
365
  alias_method(:nav, :nav_for)
374
366
  end
375
367
 
368
+ def nav_for(*args, &block)
369
+ options = args.extract_options!.to_options!
370
+ name = args.first || options[:name] || :main
371
+ Nav.for(name, &block).for(controller = self)
372
+ end
373
+ alias_method(:nav, :nav_for)
374
+
376
375
  helper do
377
376
  def nav_for(*args, &block)
378
377
  options = args.extract_options!.to_options!
data/rails_nav.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "rails_nav"
6
- spec.version = "2.3.0"
6
+ spec.version = "2.4.0"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "rails_nav"
9
9
  spec.description = "description: rails_nav kicks the ass"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_nav
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-16 00:00:00.000000000 Z
12
+ date: 2013-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails_current
@@ -73,8 +73,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  version: '0'
74
74
  requirements: []
75
75
  rubyforge_project: codeforpeople
76
- rubygems_version: 1.8.24
76
+ rubygems_version: 1.8.23
77
77
  signing_key:
78
78
  specification_version: 3
79
79
  summary: rails_nav
80
80
  test_files: []
81
+ has_rdoc: