tramway-core 1.14.2.4 → 1.14.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
  SHA256:
3
- metadata.gz: 83e5c3f0d70596f3ebaa37ecee23ceef049e69332bce0005bfb065b7c969766b
4
- data.tar.gz: bc7b8f743cdda6eb446d500058263580c894a4259184cc99c7ef0abddfcdaa7f
3
+ metadata.gz: 4097c0630d7dcef57b863d746510bb92826a738381c9f14aeb6dd60ac88ad5a9
4
+ data.tar.gz: b554f9e93d3b656237764ab63f728e4042f36e239d1ddafa346fcc9fcc9dd377
5
5
  SHA512:
6
- metadata.gz: db01de1fe36af20e77b0f50f3950dd274bd1cfe18c8a3bd2174d1e8c1521ef9a2e8f08e8eca83b5e609093604ed00c738765ebf66fb51e332bc40c680a7a8d68
7
- data.tar.gz: aa7e0bafceeb1822da3375551a9551d7d15124d279ff841184450eefe93b4ddfe91bcc1a8613de806fb5819984aa07dd03f82509fbb11b7015a31091435a0791
6
+ metadata.gz: 94489bf533fa58eaf2a10940dc38afa24d4f6e92247b4979f7557c2d895bcdf3e6700a4634024f6df34a9a801c28581a13320815985890b9398fa44266b99e6c
7
+ data.tar.gz: 65f11aca85093709c7f87a669777fdce19b4a3797d9c7c369ad6dcbe0c26efbcec8ca67e26f1f5ce13a7d1a6b8f441350c324a7b0090c30a695a1c71dbdf2fe5
@@ -54,6 +54,10 @@ class Tramway::Core::ApplicationDecorator
54
54
 
55
55
  define_method association_name do
56
56
  association = object.class.reflect_on_association(association_name)
57
+ if association.nil?
58
+ error = Tramway::Error.new(plugin: :core, method: :decorate_association, message: "Model #{object.class} does not have association named `#{association_name}`")
59
+ raise error.message
60
+ end
57
61
  class_name = if association.polymorphic?
58
62
  object.send(association_name).class
59
63
  else
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Core
5
- VERSION = '1.14.2.4'
5
+ VERSION = '1.14.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.2.4
4
+ version: 1.14.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-24 00:00:00.000000000 Z
11
+ date: 2019-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: audited