inferred_crumpets 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4663eac4c4bf9508337989e4a4d872cb638521158790a22806777e849ea682a
4
- data.tar.gz: da62b4b959de218bcd28b464c1c748a9c60b4ff721c07ac94c959659ad2d42bf
3
+ metadata.gz: d69321bbd6982d21c6b302cf44840919a009077d68f0a2a9d2bd8ebb804930e8
4
+ data.tar.gz: 888249d6ad7277a01b9e196fab03a2f21bed5f6f290c2304ec86689c7e0f27d1
5
5
  SHA512:
6
- metadata.gz: eeca72e2a8bace8b181258eac6e7ed73805a63ca67457f97ca0c758363ec235926c343aa99d3860c071b88a11b3f5be1a40652f98648b0b2ba056a7171bdb0c4
7
- data.tar.gz: 5bc60c368d47fb2e3870d4ce31b7dbee282c0eb0a3e768123f988edbbe9dc7af46f5668e6d28f0e579dff99abb01add320ab1c3e4e1cb9639b1e105b20898946
6
+ metadata.gz: 0c97bb8fb9eaf46f919ffe0cf3568dbf43ed09cc758e9ed7a52d3efcc297aa96dc858430e93477592fee98620e52ef312a1880973f9a5520736237acd054cd67
7
+ data.tar.gz: 36628f8e9522c48dd6d833f29a39ac6ce64bb2b9e46af7d79f493011492a6a35d6b5fdf9aa085ddbcf62ced92e919ec70ba386e538ec1110d4d52fe38a036b2e
@@ -1,5 +1,9 @@
1
1
  # InferredCrumpets
2
2
 
3
+ ## 0.4.2
4
+
5
+ * [TT-6224] ActiveRecord::Base subjects can now take a custom crumb name
6
+
3
7
  ## 0.4.1
4
8
 
5
9
  * [TT-5835] Fix crumb title for active record relation
@@ -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.is_a?(ActiveRecord::Relation)
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
@@ -1,3 +1,3 @@
1
1
  module InferredCrumpets
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
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.1
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-08-07 00:00:00.000000000 Z
11
+ date: 2019-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails