DRY the admin controller

This commit is contained in:
Brenda Wallace
2017-05-28 14:08:57 +12:00
committed by Shiny
parent cfb43ba07c
commit 5d50f9aec2

View File

@@ -1,16 +1,12 @@
class AdminController < ApplicationController
respond_to :html
def index
authorize! :manage, :all
respond_to do |format|
format.html # index.html.haml
end
end
def newsletter
authorize! :manage, :all
@members = Member.confirmed.wants_newsletter.all
respond_to do |format|
format.html # index.html.haml
end
respond_with @member
end
end