sibu 0.2.9 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/sibu/page.rb +14 -0
- data/lib/sibu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ca17c63c7050a5f62b9b47d6acd36fa183666d3
|
4
|
+
data.tar.gz: bddddcfbb9425a65f97af2638acaa93e7cde5bd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c403b8767fea270505ee91eed2a5209495684b6108796919b348e7f8ab0f16eddeb5bc10a43b90da6c8cd694854288bd8f44fe2a7510e0603593a0d2cb75881
|
7
|
+
data.tar.gz: 38e28f483040de3abc41d9181d67eead045ec5134f6f08342d5d81c9baf88207528961021f7e66d30432cdfd5e85125e44ae0fd9b0dce2bf5318c6aee19d6a9c
|
data/app/models/sibu/page.rb
CHANGED
@@ -36,5 +36,19 @@ module Sibu
|
|
36
36
|
new_page.name = name + ' - copie'
|
37
37
|
new_page
|
38
38
|
end
|
39
|
+
|
40
|
+
def update_templates(sections_templates)
|
41
|
+
sections.each do |s|
|
42
|
+
s["template"] = sections_templates[s["id"]]
|
43
|
+
end
|
44
|
+
save
|
45
|
+
end
|
46
|
+
|
47
|
+
def reorder_sections(*ordered_ids)
|
48
|
+
if ordered_ids.length == sections.length
|
49
|
+
self.sections = ordered_ids.map {|section_id| sections.find {|sec| sec["id"] == section_id}}
|
50
|
+
save
|
51
|
+
end
|
52
|
+
end
|
39
53
|
end
|
40
54
|
end
|
data/lib/sibu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sibu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Baptiste Vilain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|