Skip to content

Instantly share code, notes, and snippets.

@forced-request
Created April 23, 2015 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save forced-request/d3a1ba95b0ee839ae166 to your computer and use it in GitHub Desktop.
Save forced-request/d3a1ba95b0ee839ae166 to your computer and use it in GitHub Desktop.
def show
template = params[:id]
valid_templates = {
"dashboard" => "dashboard",
"profile" => "profile",
"deals" => "deals"
}
if valid_templates.include?(template)
render " #{valid_templates[template]}"
else
# throw exception or 404
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment