tramway-core 1.17.4 → 1.17.4.1

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: b6297a0252cf6856f995abf0de3e37b9376453d5df79a40e8ccb0dae8f75e06a
4
- data.tar.gz: 7e9ec3266141fa021103ee9f4263c49aeedfad149c8188b635f97653aee258eb
3
+ metadata.gz: 57df1e172fb15f98f9ab50d1ae0bef18e19d0e163b8f0255e9aeaeaa58fc4b22
4
+ data.tar.gz: 20c663842281a6e479c84d729c2ebd1f36cb9a1b67d99b8c914d2e3f144d255a
5
5
  SHA512:
6
- metadata.gz: 9cbf09a9abc0f90d6cbd59751960cbb40820309857035a5b5ec6412ff02bbfa4d91c15ac625a2bae005de13d8b043f48b10e2e7f48c6bf31bbdf5448b3412cae
7
- data.tar.gz: fb4ac5cba33590b6bee01a9e16bc96af19c12157ba103510f3d6761ba1777baf911af1b061ed29614fc97de013345a10d8f78611923fa0fa32b3982d48e8ba36
6
+ metadata.gz: 32af3b950613212b2b5d0e7eaec1ca66e5630235303dc178d8d0837135e382bea64a4b5bad3763510847d0b82b0cb0d3363c14bb3efafe8c5bd38080fb78d375
7
+ data.tar.gz: ae8206f0a248457834f8d6befbc089d94638f692e43682f212a637ca76e58261b42d564761cebf12051bc2acd7e01535402020c858e4614ebbe1f676ed5012f0
@@ -123,8 +123,10 @@ class Tramway::Core::ApplicationForm < ::Reform::Form
123
123
 
124
124
  def save
125
125
  super
126
+ rescue ArgumentError => e
127
+ Tramway::Error.raise_error :tramway, :core, :application_form, :save, :argument_error, message: e.message
126
128
  rescue StandardError => e
127
- Tramway::Error.raise_error :tramway, :core, :application_form, :submit, :looks_like_you_have_method,
129
+ Tramway::Error.raise_error :tramway, :core, :application_form, :save, :looks_like_you_have_method,
128
130
  method_name: e.name.to_s.gsub('=', ''), model_class: @@model_class, class_name: self.class
129
131
  end
130
132
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Core
5
- VERSION = '1.17.4'
5
+ VERSION = '1.17.4.1'
6
6
  end
7
7
  end
@@ -13,8 +13,10 @@ tramway:
13
13
  validates:
14
14
  you_need_to_set_model_class: 'You need to set `model_class` name while using validations. Just write `self.model_class = YOUR_MODEL_NAME` in the class area.'
15
15
  submit:
16
- looks_like_you_have_method: "Looks like you have method `%{method_name}` in %{model_class}. You should rename it or rename property in %{class_name}"
17
16
  params_should_not_be_nil: "ApplicationForm::Params should not be nil"
17
+ save:
18
+ looks_like_you_have_method: "Looks like you have method `%{method_name}` in %{model_class}. You should rename it or rename property in %{class_name}"
19
+ argument_error: "We have ArgumentError with message: %{message}"
18
20
  model_class:
19
21
  there_is_not_model_class: "There is not model class name for %{name}. Should be %{model_class_name} or you can use another class to initialize form object or just initialize form with object."
20
22
  concerns:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.4
4
+ version: 1.17.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-03-28 00:00:00.000000000 Z
12
+ date: 2020-03-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: audited