link_to_active_state 1.0.8 → 1.0.9
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 6235f67887d012b32ed65cc5639c1d4235600e9572e3cf70a864caa4b300a83a
|
|
4
|
+
data.tar.gz: 47dd042be4c6b327b5aaa4f2c620ffc40d5eb713633ec8525cf83a6ec852151d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7be4375b7dd4fc5166fdc933e8d24c165f0b04f1c3d5c49883754a0436b1d9406c6dd85bf96e04d834a0290eff4cb540e9638e6296348fcc40fe0e23cf56e9f1
|
|
7
|
+
data.tar.gz: 0eba6b78e4d563f9c59d910371a779858a89f70f3ef6a1a89038ec50343f18383cc18faae87033c2109f6c9f83af96048ed7a8ba05a53da686ff2d2fc0f4a0ea
|
data/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# LinkToActiveState
|
|
2
2
|
|
|
3
|
-
[](https://travis-ci.org/robotmay/link_to_active_state)
|
|
3
|
+
[](https://travis-ci.org/robotmay/link_to_active_state)
|
|
4
|
+
[](http://badge.fury.io/rb/link_to_active_state)
|
|
4
5
|
|
|
5
6
|
A simple gem to implement active states on links using the standard Rails `link_to` helper.
|
|
6
7
|
This can be helpful in navigation lists or buttons to give them a class when the current URL matches a condition on the link helper.
|
|
@@ -5,7 +5,8 @@ module LinkToActiveState
|
|
|
5
5
|
module ViewHelpers
|
|
6
6
|
module UrlHelper
|
|
7
7
|
def self.included(base)
|
|
8
|
-
base.send(:
|
|
8
|
+
base.send(:alias_method, :link_to_without_active_state, :link_to)
|
|
9
|
+
base.send(:alias_method, :link_to, :link_to_with_active_state)
|
|
9
10
|
end
|
|
10
11
|
|
|
11
12
|
def link_to_with_active_state(*args, &block)
|
|
@@ -7,10 +7,11 @@ Gem::Specification.new do |gem|
|
|
|
7
7
|
gem.name = "link_to_active_state"
|
|
8
8
|
gem.version = LinkToActiveState::VERSION
|
|
9
9
|
gem.authors = ["Robert May"]
|
|
10
|
-
gem.email = ["
|
|
10
|
+
gem.email = ["rob@afternoonrobot.co.uk"]
|
|
11
11
|
gem.description = %q{A simple gem to implement active states on links using the standard Rails `link_to` helper.}
|
|
12
12
|
gem.summary = %q{Active states for links using the Rails link_to helper.}
|
|
13
|
-
gem.homepage = ""
|
|
13
|
+
gem.homepage = "https://github.com/robotmay/link_to_active_state"
|
|
14
|
+
gem.licenses = ["MIT"]
|
|
14
15
|
|
|
15
16
|
gem.files = `git ls-files`.split($/)
|
|
16
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: link_to_active_state
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Robert May
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-02-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -41,7 +41,7 @@ dependencies:
|
|
|
41
41
|
description: A simple gem to implement active states on links using the standard Rails
|
|
42
42
|
`link_to` helper.
|
|
43
43
|
email:
|
|
44
|
-
-
|
|
44
|
+
- rob@afternoonrobot.co.uk
|
|
45
45
|
executables: []
|
|
46
46
|
extensions: []
|
|
47
47
|
extra_rdoc_files: []
|
|
@@ -61,8 +61,9 @@ files:
|
|
|
61
61
|
- spec/link_to_active_state/view_helpers_spec.rb
|
|
62
62
|
- spec/link_to_active_state_spec.rb
|
|
63
63
|
- spec/spec_helper.rb
|
|
64
|
-
homepage:
|
|
65
|
-
licenses:
|
|
64
|
+
homepage: https://github.com/robotmay/link_to_active_state
|
|
65
|
+
licenses:
|
|
66
|
+
- MIT
|
|
66
67
|
metadata: {}
|
|
67
68
|
post_install_message:
|
|
68
69
|
rdoc_options: []
|
|
@@ -79,8 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
79
80
|
- !ruby/object:Gem::Version
|
|
80
81
|
version: '0'
|
|
81
82
|
requirements: []
|
|
82
|
-
|
|
83
|
-
rubygems_version: 2.4.5.1
|
|
83
|
+
rubygems_version: 3.0.3
|
|
84
84
|
signing_key:
|
|
85
85
|
specification_version: 4
|
|
86
86
|
summary: Active states for links using the Rails link_to helper.
|