added admin part with password protected map and supporter list UNTESTED
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
class Admin::ApplicationController < ApplicationController
|
||||
http_basic_authenticate_with name: "admin", password: ENV['ADMIN_PASSWORD'] unless Rails.env.development?
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class Admin::PagesController < Admin::ApplicationController
|
||||
def map
|
||||
@supporters = Supporter.where(:coordinates.ne => nil).only(:coordinates, :support)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class Admin::SupportersController < Admin::ApplicationController
|
||||
def index
|
||||
@supporters = Supporter.desc(:created_at)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user