tramway-core 1.14.2.1 → 1.14.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4bd63e8742feb45eed89c72d3f39aae46ba07817f6720a98f44f48a658a1347a
4
- data.tar.gz: 5c226340527b6db6fb6546b57389dc1c49e94d73abdb5740651de876210fdbe2
3
+ metadata.gz: 18a93e1530863c7ddb15e6adb573d5ea06aae29357eabdf06ed433dc9e170cc6
4
+ data.tar.gz: 8066187cef4863fa4f7a830d90a90ed78afffb2aa29fef32760b5037d07da38c
5
5
  SHA512:
6
- metadata.gz: 482b34424221d1c0f4eff503fdd59b73147925ccf57d4e76ed116065e4300a9ca175068a86db58e478364520f44bd59f72f2e3a250a3aae8be4da07000769cbb
7
- data.tar.gz: f3ba9bd6ffa10a7316edcf0ba9b64c08705bc1e0bad9e303ed9ca39501dd022af58fb76380309717823e3bfcc7d739295967f7d449ed5fd395f5bdd13da0ed48
6
+ metadata.gz: d05a35d45517d87b4d25908edc824e07aedaea45ec617c7b296131104cb6d9435e3b1fcf60ba38e1594cc9ac570bc913910d797c74614d2916e72f60f45b43c0
7
+ data.tar.gz: 8554ecb444b5c84a819ee6fc4a8cd28bca1c250a39eb4113481bb788180bd1e6636d0e309e9542be054568f45d738e8d5cc4ad09d01320f896bfa425c8d211a7
@@ -33,7 +33,12 @@ module Tramway::Core
33
33
  def submit(params)
34
34
  if params
35
35
  if validate params
36
- save
36
+ begin
37
+ save
38
+ rescue StandardError => e
39
+ error = Tramway::Error.new(plugin: :core, method: :submit, message: "Looks like you have method `#{e.name.to_s.gsub('=', '')}` in #{@@model_class}. You should rename it or rename property in #{self.class}")
40
+ raise error.message
41
+ end
37
42
  else
38
43
  association_error = false
39
44
  @@associations.each do |association|
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Core
5
- VERSION = '1.14.2.1'
5
+ VERSION = '1.14.2.2'
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.1
4
+ version: 1.14.2.2
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-11 00:00:00.000000000 Z
11
+ date: 2019-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: audited