Guest User

Untitled

a guest
Feb 20th, 2018
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. def show
  2. page_id = "pages/#{(params[:id] || 'home').to_s}"
  3. @partial_title = params[:id] || "Home"
  4. logger.debug(page_id)
  5. if template_exists?(page_id)
  6. render :template => page_id
  7. else
  8. raise ActiveRecord::RecordNotFound, "Couldn't find the page #{params[:id]}"
  9. end
  10. end
Add Comment
Please, Sign In to add comment