effective_pages 0.9.1 → 0.9.2
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: a79dbb57c52dbba7a942dc5ab61f99dea6c2a425
|
4
|
+
data.tar.gz: 2ff4f3480deba1e9393b951263f49cbd400cdfd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a9d35738f11252819d50d853d94b310295e54baea224b899d061e8d248a181b8cbe5c213343990b38f5e0505ac82d0725d9f0f9120af59397e3ec412a0678a3
|
7
|
+
data.tar.gz: 19e5d44b424479ade5d01d74fdfd60ee93b0ea9423cc96d31bf13a310130d24e941511ec20cf79676be38f24bd586f8f3a1a5e70bc477564fd73032717087a0d
|
@@ -33,6 +33,8 @@ module Admin
|
|
33
33
|
if @page.save
|
34
34
|
if params[:commit] == 'Save and Edit Content' && defined?(EffectiveRegions)
|
35
35
|
redirect_to effective_regions.edit_path(effective_pages.page_path(@page))
|
36
|
+
elsif params[:commit] == 'Save and Add New'
|
37
|
+
redirect_to effective_pages.new_admin_page_path
|
36
38
|
else
|
37
39
|
flash[:success] = 'Successfully created page'
|
38
40
|
redirect_to effective_pages.edit_admin_page_path(@page)
|
@@ -59,6 +61,8 @@ module Admin
|
|
59
61
|
if @page.update_attributes(page_params)
|
60
62
|
if params[:commit] == 'Save and Edit Content' && defined?(EffectiveRegions)
|
61
63
|
redirect_to effective_regions.edit_path(effective_pages.page_path(@page))
|
64
|
+
elsif params[:commit] == 'Save and Add New'
|
65
|
+
redirect_to effective_pages.new_admin_page_path
|
62
66
|
else
|
63
67
|
flash[:success] = 'Successfully updated page'
|
64
68
|
redirect_to effective_pages.edit_admin_page_path(@page)
|
@@ -20,7 +20,7 @@ module Effective
|
|
20
20
|
|
21
21
|
def self.update_from_effective_regions!(params)
|
22
22
|
(params || {}).each do |menu_id, attributes|
|
23
|
-
menu = Effective::Menu.find(menu_id)
|
23
|
+
menu = Effective::Menu.includes(:menu_items).find(menu_id)
|
24
24
|
|
25
25
|
attributes[:menu_items_attributes].each { |_, atts| atts[:menuable_type] = 'Effective::Page' if atts[:menuable_type].blank? }
|
26
26
|
menu.attributes = attributes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_pages
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.1
|
103
|
+
version: 1.2.1
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.1
|
110
|
+
version: 1.2.1
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: effective_regions
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|