Guest User

Untitled

a guest
Jul 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. def show
  2. unless read_fragment({})
  3. @page = Page.find_by_name params[:name]
  4.  
  5. if !@page
  6. flash[:notice] = "This page doesn't currently exist, you can create it"
  7. redirect_to new_page_url(params[:name])
  8. elsif @page.deleted
  9. flash[:notice] = 'This page was deleted, you can restore a previous version'
  10. redirect_to revise_page_url(params[:name])
  11. else
  12. @page.body = format_custom(@page.body)
  13. end
  14. end
  15. end
Add Comment
Please, Sign In to add comment