inferred_crumpets 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/CHANGELOG.md +4 -0
- data/lib/inferred_crumpets/builder.rb +7 -0
- data/lib/inferred_crumpets/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65e934c11162bd51c3cacc6e79ad454c9c99cb6b
|
4
|
+
data.tar.gz: 62806af65991fd0172d9d525f39713b67516917d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72d88d79cec9736d518534b2b1783e3494e99019bfb5d296bf7b1dc8872b24de48e6f9ad58c5a88de206ae99d90b42c351a2ef2e225c16a08f054dd1f01c2e03
|
7
|
+
data.tar.gz: fd0ab2ecc00af082336b3a132bdccbb5f758b46c9eb9ef18dd597f29f870fde4953b6665bab3148da1317e08473ea063a4f767c16e7e32ae328e85dbecf7d8b3
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.4.0
|
data/CHANGELOG.md
CHANGED
@@ -52,6 +52,7 @@ module InferredCrumpets
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def build_crumb_for_action!
|
55
|
+
return unless linkable?
|
55
56
|
return unless subject.is_a?(ActiveRecord::Base)
|
56
57
|
|
57
58
|
if %w(new create).include?(action)
|
@@ -96,6 +97,12 @@ module InferredCrumpets
|
|
96
97
|
false
|
97
98
|
end
|
98
99
|
|
100
|
+
def linkable?
|
101
|
+
view_context.url_for(subject)
|
102
|
+
rescue NoMethodError
|
103
|
+
false
|
104
|
+
end
|
105
|
+
|
99
106
|
def can_route?(action, params = {})
|
100
107
|
view_context.url_for({
|
101
108
|
action: action,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inferred_crumpets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grant Colegate
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -89,6 +89,7 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- ".gitignore"
|
91
91
|
- ".rspec"
|
92
|
+
- ".ruby-version"
|
92
93
|
- ".travis.yml"
|
93
94
|
- CHANGELOG.md
|
94
95
|
- CODE_OF_CONDUCT.md
|
@@ -124,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
125
|
version: '0'
|
125
126
|
requirements: []
|
126
127
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.6.
|
128
|
+
rubygems_version: 2.6.8
|
128
129
|
signing_key:
|
129
130
|
specification_version: 4
|
130
131
|
summary: Automatic breadcrumbs for Rails.
|