Class: Admin::SubscribersController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::SubscribersController
- Defined in:
- app/controllers/admin/subscribers_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'app/controllers/admin/subscribers_controller.rb', line 19 def destroy @subscriber = Subscriber.find(params[:id]) @subscriber.destroy respond_to do |format| format.html { redirect_to( :back ) } format.xml { head :ok } end end |
#index ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/admin/subscribers_controller.rb', line 4 def index @subscribers = Subscriber.paginate :page => params[:page], :order => sort_order respond_to do |format| format.html # index.html.erb format.xml { render :xml => @subscribers } format.csv do @subscribers = Subscriber.find(:all, :order => 'created_at DESC') @filename = 'subscribers.csv' render :layout => false end end end |