alchemy-custom-model 0.1.3 → 0.1.4
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ef531bafab201670ebec692b3c42d82fce5bdf8a
|
|
4
|
+
data.tar.gz: a98bae6d82311bd796ef9a022a97e512aab9613d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 418b99a0631ed5251723842079f7dd0b2041527f893635f42f0d64e854926543a5e0adb9811f8e4d7d692978174a5d922085ea2a4c07e7f7d0d149831ac4f013
|
|
7
|
+
data.tar.gz: 6eac9c598b9e52a246aaac6685792586c5bc8593a9fcb5dc516efda1298249c55e6363695b337b37494003f6f1057f3d1da13b58e5e0baee247e1a8c7d897dbe
|
|
@@ -44,19 +44,22 @@ module Alchemy::Custom::Model
|
|
|
44
44
|
language_code: params[:locale] || Alchemy::Language.current.code
|
|
45
45
|
)
|
|
46
46
|
|
|
47
|
+
if parent_page.nil?
|
|
48
|
+
raise ActionController::RoutingError, "Parent Page not Found [#{url_params[:page_name]}]"
|
|
49
|
+
end
|
|
47
50
|
|
|
48
51
|
#TODO magari implementare ricerca children in base a una action es. edit new chow ecc
|
|
49
52
|
|
|
50
53
|
@page = parent_page.children.first
|
|
51
54
|
|
|
52
55
|
if @page.nil?
|
|
53
|
-
raise "You have to define a subpage for custom model"
|
|
56
|
+
raise ActionController::RoutingError, "You have to define a subpage for custom model"
|
|
54
57
|
end
|
|
55
58
|
|
|
56
59
|
custom_model_string = get_custom_model_string
|
|
57
60
|
|
|
58
61
|
if custom_model_string.blank?
|
|
59
|
-
raise "You have to specify custom_model in page_layouts config file"
|
|
62
|
+
raise ActionController::RoutingError, "You have to specify custom_model in page_layouts config file"
|
|
60
63
|
else
|
|
61
64
|
custom_model = custom_model_string.classify.constantize
|
|
62
65
|
@custom_element = custom_model.only_current_language.friendly.find(url_params[:custom_model_id])
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: alchemy-custom-model
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alessandro Baccanelli
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2019-
|
|
12
|
+
date: 2019-03-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: alchemy_cms
|
|
@@ -242,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
242
242
|
version: '0'
|
|
243
243
|
requirements: []
|
|
244
244
|
rubyforge_project:
|
|
245
|
-
rubygems_version: 2.
|
|
245
|
+
rubygems_version: 2.5.2
|
|
246
246
|
signing_key:
|
|
247
247
|
specification_version: 4
|
|
248
248
|
summary: A gem for semplify model implementation with Alchemy CMS
|