Skip to content

Instantly share code, notes, and snippets.

@forced-request
Created April 23, 2015 16:03
Show Gist options
  • 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