documentation-editor 0.10.0 → 0.10.1

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: f1d11c9e046b823acea840a344e93b4f3c4fb2e2
4
- data.tar.gz: 8722bd73901e2cb8cc1a722b9926c482f7e76b85
3
+ metadata.gz: 923b3b6c0ec4554fab044b9dbe3d3eedbcf60e32
4
+ data.tar.gz: bb3df4c064287322a4fdfa0839d990ac92f3e390
5
5
  SHA512:
6
- metadata.gz: 50dfa6ea18a420ee9b62242da795db1b1d2571e4d44b3d8d4c62e97ddd2ff4c452a9522023752af97904e5cb16c1fe2a4bea0abc305517b6be4799676c18bb2e
7
- data.tar.gz: cf05a99e8c27a12ebd73c0fe144be87f57598ad3bb51ac1f96396f4a28da6185e6bce1589d6beca260722639b827ff2684353d1d7101226302f993caae283a98
6
+ metadata.gz: 19fb4dcb2105f3c65b0dc60cd206fb7165a05e997b59066c17d522fc9d16a5c74ced37e65e9f8e7302eb14eb962b4b6d5066107a3e71dc0717b6e6009e5211db
7
+ data.tar.gz: 4532f9d6dd9c66444b16ee5b0da782fc6625636ebb8e0387a755159fa4b7e699f3965c7ed838d33a833ab4dc7ad8efd9128c5376c9a078efffb943768f5f1f15
@@ -129,7 +129,8 @@ module DocumentationEditor
129
129
 
130
130
  def import
131
131
  JSON.parse(params[:file][:content].read).each do |page|
132
- p = Page.find_or_initialize_by(slug: params[:slug])
132
+ p = Page.where(slug: page['slug']).first || Page.new
133
+ p.slug = page['slug']
133
134
  p.created_at = page['created_at']
134
135
  p.title = page['title']
135
136
  p.languages = page['langauges']
@@ -1,3 +1,3 @@
1
1
  module DocumentationEditor
2
- VERSION = "0.10.0"
2
+ VERSION = "0.10.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: documentation-editor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia Team