Skip to content

Instantly share code, notes, and snippets.

@mikespokefire
Created July 15, 2012 13:29
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 mikespokefire/3116934 to your computer and use it in GitHub Desktop.
Save mikespokefire/3116934 to your computer and use it in GitHub Desktop.
class AdminController < ApplicationController
layout "admin"
http_basic_authenticate_with :name => "user", :password => "password"
end
class Admin::CoastersController < AdminController
def index
end
def show
end
-- Other restful routes --
end
namespace :admin do
resources :coasters # This one will hit Admin::CoastersController
end
resources :coasters # This one will hit CoastersController (the one you already have)
root to: "pages#home"
@rctneil
Copy link

rctneil commented Jul 16, 2012

Mike, Did you mean to alter the gist in some way? As far as I can see, it looks identical.

@mikespokefire
Copy link
Author

There we go, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment