We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d61ea7 commit a2e4b10Copy full SHA for a2e4b10
app/controllers/docs_controller.rb
@@ -7,7 +7,7 @@ def index
7
8
def show
9
@doc = Document.new(params[:id])
10
- redirect_to scrivito_path(Obj.root) if not @doc.exists?
+ redirect_to root_url unless @doc.exists?
11
@content = Kramdown::Document.new(@doc.content, input: 'GFM').to_html
12
@url = request.url
13
end
spec/controllers/docs_controller_spec.rb
@@ -18,7 +18,7 @@
18
19
it 'when invalid filename' do
20
get :show, params: { id: '../not_found' }
21
- expect(response).to redirect_to controller.scrivito_path(Obj.root)
+ expect(response).to redirect_to controller.root_url
22
expect(response.status).to eq 302
23
24
0 commit comments