corn_starch 1.9.31 → 1.9.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/corn_starch/corn_starch_controller.rb +10 -0
- data/lib/corn_starch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c4cb1360eb3e3b64083e85a833bb8d2ec2951e0
|
4
|
+
data.tar.gz: e89dc2253edac2293056e52eb95e56c134801ace
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11d0fe1f8e5ea51afdbd0fb4d77b1e66284ec20c5cbb50edab7e9acbc64b92072e5ca8bddff8fe471e942dc1ac4afdfe386411234b21165b7c37517ae1bca555
|
7
|
+
data.tar.gz: b01c634b313dcbc289042349da9510c144650044046e0bece71a0cebe76a35c8071e5c02e5fcbe26332c50676e9d88252eb5ab9ccdb8ce5601b8b6bb752b46f5
|
@@ -273,5 +273,15 @@ module CornStarch
|
|
273
273
|
{ head: t('gen_msg.unknown_action.head'), body: t('gen_msg.unknown_action.body', action: action) }
|
274
274
|
end
|
275
275
|
end
|
276
|
+
|
277
|
+
# Build Notification Error String
|
278
|
+
def notify_errors entity
|
279
|
+
entity.try(:errors).try(:full_messages).try(:collect) { |e| "\n - #{e}" }.try :join
|
280
|
+
end
|
281
|
+
|
282
|
+
# Build Notification
|
283
|
+
def notify key, head_hash = nil, body_hash = nil
|
284
|
+
{ head: t("#{key}.head", head_hash), body: t("#{key}.body", body_hash) }
|
285
|
+
end
|
276
286
|
end
|
277
287
|
end
|
data/lib/corn_starch/version.rb
CHANGED