Skip to content

Commit

Permalink
Allow vanity names in datacenters
Browse files Browse the repository at this point in the history
  • Loading branch information
rantav committed Apr 17, 2012
1 parent d5c4f8e commit c4a6cbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/datacenters_controller.rb
Expand Up @@ -16,8 +16,8 @@ def index
# GET /datacenters/1 # GET /datacenters/1
# GET /datacenters/1.json # GET /datacenters/1.json
def show def show
@datacenter = Datacenter.find(params[:id]) id = params[:id]

@datacenter = Datacenter.any_of({_id: id}, {name: id}).first
respond_to do |format| respond_to do |format|
format.html # show.html.erb format.html # show.html.erb
format.json { render json: @datacenter } format.json { render json: @datacenter }
Expand Down

0 comments on commit c4a6cbc

Please sign in to comment.