inferred_crumpets 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: 9167b46eb1fc04129fdffc29a15d43d371e6913b
4
- data.tar.gz: 86847a87ee2ec9d896a7df3c0d7ee0283e579e42
3
+ metadata.gz: 2e49994914324e9b9564161b3713f75ebc20d329
4
+ data.tar.gz: acf2a10fe6b04e4298f7478d55528cf69c7a3476
5
5
  SHA512:
6
- metadata.gz: 175fb803091058b53f42145387855ca322b6f2bf13ee7e972a1af864d3804eb2e100348a5342a0bb23fc1b784462a9707e804188666033dfb1b546eacab5bea6
7
- data.tar.gz: 306aca9396c7cb1b03567f8ce8d41f5e43b1a434ee2c17b6c765678e923597f2fdeab62da267ed6991374634da8ed84edc727f2f9a9a0093534167cfe2fd8b9f
6
+ metadata.gz: d10b75694952f205811c04ce3613f67676739cad37952035f7adbbc2f51442bc4764b503c6a1fbf07ebc01ede390ebe240a7f71d4b4fed358bb0a35ae8593eda
7
+ data.tar.gz: b90189c270066f977b842b2664de1ecb3a19ad631a6a2a482a9bc0f77431f99292adfc0020e4c5be06993871a2996f253da5fc6db28fc1c64eecd1be3396659b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # InferredCrumpets
2
2
 
3
+ ## 0.2.3
4
+
5
+ * [TT-3117] Fix: NoMethodError when subject is not linkable
6
+
3
7
  ## 0.2.2
4
8
 
5
9
  * [TT-3102] Fix: Show subject crumb even when action is not linkable
@@ -54,13 +54,13 @@ module InferredCrumpets
54
54
  def build_crumb_for_action!
55
55
  return unless subject.is_a?(ActiveRecord::Base)
56
56
 
57
- if %w(new create).include?(action) && linkable?
57
+ if %w(new create).include?(action)
58
58
  view_context.crumbs.add_crumb('New', wrapper_options: { class: 'active' })
59
59
  return
60
60
  end
61
61
 
62
62
  build_crumb_for_subject!
63
- if %w(edit update).include?(action) && linkable?
63
+ if %w(edit update).include?(action)
64
64
  view_context.crumbs.add_crumb('Edit', wrapper_options: { class: 'active' })
65
65
  end
66
66
  end
@@ -70,7 +70,7 @@ module InferredCrumpets
70
70
  end
71
71
 
72
72
  def url_for_subject
73
- return unless can_route?(:show, id: subject.id)
73
+ return unless can_route?(:show, id: subject.id) && linkable?
74
74
  view_context.url_for(shallow? ? transformed_subject : subject_with_parents)
75
75
  end
76
76
 
@@ -1,3 +1,3 @@
1
1
  module InferredCrumpets
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
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.2.2
4
+ version: 0.2.3
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-08-24 00:00:00.000000000 Z
11
+ date: 2017-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails