radiant-archive_tabs-extension 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,8 +12,10 @@ module RadiantArchiveTabsExtension
12
12
  end
13
13
 
14
14
  def current_url_with_archive?(options)
15
- if current_object.respond_to?(:parent) && archive_page?(current_object.parent)
16
- parent_url = url_for index_page_for_model_with_archive
15
+ if respond_to?(:current_object) && current_object.respond_to?(:parent) && archive_page?(current_object.parent)
16
+ # get the index url without pagination variables
17
+ parent_url = index_page_for_model_with_archive
18
+ parent_url.delete(:p)
17
19
 
18
20
  url = case options
19
21
  when Hash
@@ -22,7 +24,7 @@ module RadiantArchiveTabsExtension
22
24
  options.to_s
23
25
  end
24
26
 
25
- parent_url == clean(url)
27
+ clean(url_for parent_url) == clean(url)
26
28
  else
27
29
  current_url_without_archive?(options)
28
30
  end
@@ -1,3 +1,3 @@
1
1
  module RadiantArchiveTabsExtension
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-archive_tabs-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jason Taylor
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-26 00:00:00 +10:00
18
+ date: 2011-05-28 00:00:00 +10:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -52,7 +52,7 @@ has_rdoc: true
52
52
  homepage: http://github.com/jsntv200/radiant-archive_tabs-extension
53
53
  licenses: []
54
54
 
55
- post_install_message: "\n Edit your Radiant environment.rb file and add the following :\n\n 1. Ensure Archive Tabs is loaded last\n\n config.extensions = [ :all, :archive_tabs ]\n\n 2. Load Archive Tabs by adding the gem\n\n config.gem 'radiant-archive_tabs-extension', :version => '1.0.1'\n "
55
+ post_install_message: "\n Edit your Radiant environment.rb file and add the following :\n\n 1. Ensure Archive Tabs is loaded last\n\n config.extensions = [ :all, :archive_tabs ]\n\n 2. Load Archive Tabs by adding the gem\n\n config.gem 'radiant-archive_tabs-extension', :version => '1.0.2'\n "
56
56
  rdoc_options: []
57
57
 
58
58
  require_paths: