Skip to content

Instantly share code, notes, and snippets.

@adonaldson
Created November 5, 2010 17:21
Show Gist options
  • Save adonaldson/664480 to your computer and use it in GitHub Desktop.
Save adonaldson/664480 to your computer and use it in GitHub Desktop.
class AdvertsController < ActionController::Base
protect_from_forgery
# Non-adminny controller, delete the adverts.html.erb from app/view/layouts, it'll default to using
# application.html.erb
end
class AdminController < ActionController::Base
protect_from_forgery
before_filter :login_required
before_filter :admin_required
layout 'admin'
end
class Admin::UsersController < AdminController
# Lovely and empty now!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment