corn_starch 1.8.22 → 1.8.23
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c53e0cae3e2454ae6bbe227d0166c5d17a8bed3
|
4
|
+
data.tar.gz: e1ec042442c9ded5d1da8064d587e3fb47d1d628
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a85535b8a19691226c0b71c07258f9d08f8dc911985015650951d7a504bcba9ecff96bed7ecf840c135b0cc1a0e2418e3e43d262f3124fe9bf4d8ed618fd295
|
7
|
+
data.tar.gz: db8065f39ae058bfad2beb309250e7f0bc15a7df0003c31fb94cf385c3b6b42fcc45f00c6d84628b11c3ddb29407b0342bd531a6af074f9832578f6d87440a2c
|
@@ -239,6 +239,9 @@ module CornStarch
|
|
239
239
|
uname = current_user ? current_user.display_name : ''
|
240
240
|
ename = entity ? entity.display_name : ''
|
241
241
|
|
242
|
+
# Acquire Errors
|
243
|
+
errors = entity.try(:errors).try(:collect) { |e| "\n - #{e}" }.try :join
|
244
|
+
|
242
245
|
# Switch on Action
|
243
246
|
case action
|
244
247
|
|
@@ -255,12 +258,12 @@ module CornStarch
|
|
255
258
|
when :create
|
256
259
|
{
|
257
260
|
pass: { head: t('gen_msg.create.pass.head', model: model), body: t('gen_msg.create.pass.body', model: model, name: ename) },
|
258
|
-
fail: { head: t('gen_msg.create.fail.head', model: model), body: t('gen_msg.create.fail.body') }
|
261
|
+
fail: { head: t('gen_msg.create.fail.head', model: model), body: t('gen_msg.create.fail.body', errors: errors) }
|
259
262
|
}[result_or_name]
|
260
263
|
when :update
|
261
264
|
{
|
262
265
|
pass: { head: t('gen_msg.update.pass.head', model: model), body: t('gen_msg.update.pass.body', model: model, name: ename) },
|
263
|
-
fail: { head: t('gen_msg.update.fail.head', model: model), body: t('gen_msg.update.fail.body') }
|
266
|
+
fail: { head: t('gen_msg.update.fail.head', model: model), body: t('gen_msg.update.fail.body', errors: errors) }
|
264
267
|
}[result_or_name]
|
265
268
|
when :destroy
|
266
269
|
{ head: t('gen_msg.destroy.head', model: model), body: t('gen_msg.destroy.body', model: model, name: result_or_name) }
|
data/config/locales/en.yml
CHANGED
data/lib/corn_starch/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: corn_starch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.23
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eresse
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|