documentation-editor 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/documentation_editor/page.rb +9 -0
- data/lib/documentation_editor/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: 73df497dbde26523003bbad414656c6602e3ec34
|
4
|
+
data.tar.gz: 42356b52768e202f985e1938251e3a3395fca12e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e63484a201f765e17468fb63a0d9929ad57e7f220bf47ca0c24f1cd835d70e422ae546d60e1c2f0a8da59fd434d012e5658983886c5aaf75a791adc370dac96
|
7
|
+
data.tar.gz: e3274fdbc790741abc6cf045d1cc9f3240c35dd9dc839c383455a4d485fdde9dbad8f59fb5976659085d9b83f862c0068c177c03f5bbf9f11f6c18cad7a72e41
|
@@ -8,6 +8,8 @@ module DocumentationEditor
|
|
8
8
|
|
9
9
|
belongs_to :thumbnail, class_name: 'Image'
|
10
10
|
|
11
|
+
after_create :add_first_revision
|
12
|
+
|
11
13
|
def add_revision!(content, publish = false, author_id = nil)
|
12
14
|
r = revisions.build
|
13
15
|
r.author_id = author_id
|
@@ -24,5 +26,12 @@ module DocumentationEditor
|
|
24
26
|
thumbnail.try(:image).try(:url)
|
25
27
|
end
|
26
28
|
|
29
|
+
private
|
30
|
+
def add_first_revision
|
31
|
+
r = Revision.new
|
32
|
+
r.content = "# FIXME\n\nLorem ipsum."
|
33
|
+
self.revisions << r
|
34
|
+
end
|
35
|
+
|
27
36
|
end
|
28
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: documentation-editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|