Skip to content

Commit

Permalink
added admin auth
Browse files Browse the repository at this point in the history
  • Loading branch information
guub committed Nov 11, 2016
1 parent 120629e commit 86b4663
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/admin/categories_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Admin::CategoriesController < ApplicationController
class Admin::CategoriesController < AdminController

def index
@categories = Category.order(id: :desc).all
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/dashboard_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Admin::DashboardController < ApplicationController
class Admin::DashboardController < AdminController
def show
end
end
2 changes: 1 addition & 1 deletion app/controllers/admin/products_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Admin::ProductsController < ApplicationController
class Admin::ProductsController < AdminController

def index
@products = Product.order(id: :desc).all
Expand Down
5 changes: 5 additions & 0 deletions app/controllers/admin_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AdminController < ApplicationController

http_basic_authenticate_with name: "jungle", password: "boogie"

end

0 comments on commit 86b4663

Please sign in to comment.