inferred_crumpets 0.4.1 → 0.4.2
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/inferred_crumpets/builder.rb +3 -1
- data/lib/inferred_crumpets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d69321bbd6982d21c6b302cf44840919a009077d68f0a2a9d2bd8ebb804930e8
|
|
4
|
+
data.tar.gz: 888249d6ad7277a01b9e196fab03a2f21bed5f6f290c2304ec86689c7e0f27d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0c97bb8fb9eaf46f919ffe0cf3568dbf43ed09cc758e9ed7a52d3efcc297aa96dc858430e93477592fee98620e52ef312a1880973f9a5520736237acd054cd67
|
|
7
|
+
data.tar.gz: 36628f8e9522c48dd6d833f29a39ac6ce64bb2b9e46af7d79f493011492a6a35d6b5fdf9aa085ddbcf62ced92e919ec70ba386e538ec1110d4d52fe38a036b2e
|
data/CHANGELOG.md
CHANGED
|
@@ -45,7 +45,9 @@ module InferredCrumpets
|
|
|
45
45
|
def build_crumb_for_collection!
|
|
46
46
|
return if parents.present? && linkable?
|
|
47
47
|
|
|
48
|
-
if subject.
|
|
48
|
+
if subject.class.respond_to?(:collection_title)
|
|
49
|
+
view_context.crumbs.add_crumb subject.class.collection_title, url_for_collection
|
|
50
|
+
elsif subject.is_a?(ActiveRecord::Relation)
|
|
49
51
|
view_context.crumbs.add_crumb relation_name.pluralize.titleize
|
|
50
52
|
elsif subject.is_a?(ActiveRecord::Base)
|
|
51
53
|
view_context.crumbs.add_crumb subject.class.table_name.titleize, url_for_collection
|
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.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Grant Colegate
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|