activeadmin-selleo-cms 0.0.42 → 0.0.43

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.
@@ -84,7 +84,7 @@ ActiveAdmin.register ActiveadminSelleoCms::Page, as: "Page", sort_order: "lft_as
84
84
  render action: :new
85
85
  else
86
86
  create! do |success, failure|
87
- success.html { redirect_to admin_page_path(@page.id) }
87
+ success.html { redirect_to "#{@page.url}?editing=true" }
88
88
  failure.html { render action: :new }
89
89
  end
90
90
  end
@@ -40,8 +40,10 @@ module ActiveadminSelleoCms
40
40
  end
41
41
 
42
42
  after_initialize do
43
- self.layout_name = Layout.all.first if (new_record? and layout_name.blank?) or (read_attribute(:layout_name) and !layout)
44
- create_missing_sections
43
+ if attributes.keys.include?("layout_name")
44
+ self.layout_name = Layout.all.first if (new_record? and layout_name.blank?) or (read_attribute(:layout_name) and !layout)
45
+ create_missing_sections unless new_record?
46
+ end
45
47
  end
46
48
 
47
49
  after_initialize do
@@ -82,7 +84,7 @@ module ActiveadminSelleoCms
82
84
  end
83
85
 
84
86
  def to_label
85
- "#{'- ' * depth} #{title}"
87
+ "#{'- ' * depth.to_i} #{title}"
86
88
  end
87
89
 
88
90
  def section_names
@@ -1,3 +1,3 @@
1
1
  module ActiveadminSelleoCms
2
- VERSION = "0.0.42"
2
+ VERSION = "0.0.43"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-selleo-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.42
4
+ version: 0.0.43
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-02 00:00:00.000000000 Z
12
+ date: 2013-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails