Permalink
Browse files

redirect back to book/:lang when book page is not found

  • Loading branch information...
1 parent 81c7a28 commit 7a36f5326174b87e86c03bd369297e5cf54b13cc @bry4n bry4n committed Jun 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/doc_controller.rb
@@ -72,7 +72,7 @@ def book
def book_section
@content = @book.sections.where(:slug => params[:slug]).first
- raise PageNotFound unless @content
+ return redirect_to "/book/#{@book.code}" unless @content
@related = @content.get_related(8)
end

1 comment on commit 7a36f53

Contributor

jnavila commented on 7a36f53 Jul 3, 2012

Hum, (not so) elegant way of hiding some bugs, namely #88

Please sign in to comment.