Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def show
- unless read_fragment({})
- @page = Page.find_by_name params[:name]
- if !@page
- flash[:notice] = "This page doesn't currently exist, you can create it"
- redirect_to new_page_url(params[:name])
- elsif @page.deleted
- flash[:notice] = 'This page was deleted, you can restore a previous version'
- redirect_to revise_page_url(params[:name])
- else
- @page.body = format_custom(@page.body)
- end
- end
- end
Add Comment
Please, Sign In to add comment