documentation-editor 0.3.0 → 0.3.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: de3dc4291b2f0215d3e0021c5cfe95060b8f178c
4
- data.tar.gz: efd354eebc831c9faf0898a5b18930bc244fea6c
3
+ metadata.gz: 3625a114ab98bcbd702d8b61f9cfdb9f557faf79
4
+ data.tar.gz: 6dbc8592fd6b1912638a7f30eedec88f3edab4be
5
5
  SHA512:
6
- metadata.gz: a085cab90f82e21f8b12608797dad347b01cb3f34d808e446482f997669ab7e87fc0cb470585569207afab4e81d9b603845f086d36fa07c548ee8552a0909005
7
- data.tar.gz: 61bbd321089e9b6fed435cb6b9f2e99616cdd243dfa998e834f2cc3baf336ff131d2fc9237c616023ee7edbdf40ebd532792c410340eb1b302a70a6614e66ee1
6
+ metadata.gz: a0cab134e685459d2ed0f30ff4b2fb4dd2a9f79bd68156cda70b027ab1722bcb15dddab7b67fe85e1e95c9bb9ec6c1add9c9f723768f20fd134e8c4d8fb240f2
7
+ data.tar.gz: 74bcfcec2eae27e018a9a3034fd892128bbbf964714566addbe69c6d3bbcbdf52df9a68b895c7907c9626cedb88ffed3b9486bf09d7ba755352d8c63ba23209e
data/README.md CHANGED
@@ -164,7 +164,7 @@ Rails.application.routes.draw do
164
164
  end
165
165
  ```
166
166
 
167
- If you're using the `wrap_h1_with_sections` option you can use the `:section` param to restrict the rendering to a specific section your page. The TOC will still contain everything. That's something you may want to use for SEO reasons.
167
+ If you're using the `wrap_h1_with_sections` option you can use the `:section` param to restrict the rendering to a specific section your page. The TOC will still contain everything. That's something you may want to use for SEO reasons. This must be the last part of your URL.
168
168
 
169
169
  ## Usage
170
170
 
@@ -61,7 +61,13 @@ module DocumentationEditor
61
61
  @page = Page.find_by!(slug: params[:slug])
62
62
  @revision = @page.published_revision
63
63
  @options = params
64
- @base_path = params[:section] ? request.path.split('/sections/').first : request.path
64
+ @base_path = if params[:section]
65
+ s = request.path.split('/')
66
+ s.pop
67
+ s.join('/')
68
+ else
69
+ request.path
70
+ end
65
71
  render :preview
66
72
  end
67
73
 
@@ -1,3 +1,3 @@
1
1
  module DocumentationEditor
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia Team