Class: Admin::SubscribersController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::SubscribersController
- Defined in:
- app/controllers/admin/subscribers_controller.rb
Instance Method Summary collapse
Instance Method Details
#resubscribe ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/admin/subscribers_controller.rb', line 15 def resubscribe @subscriber = object if @subscriber.resubscribe! flash[:notice] = t('resubscribe_success') else flash[:error] = t('resubscribe_failed') end redirect_to request.referer end |
#unsubscribe ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'app/controllers/admin/subscribers_controller.rb', line 25 def unsubscribe @subscriber = object if @subscriber.unsubscribe! flash[:notice] = t('unsubscribe_success') else flash[:error] = t('unsubscribe_failed') end redirect_to request.referer end |
#unsubscribed ⇒ Object
35 36 37 38 39 40 |
# File 'app/controllers/admin/subscribers_controller.rb', line 35 def unsubscribed params[:search] ||= {} params[:search][:unsubscribed_at_is_not_null] = true @subscribers = collection render :template => 'admin/subscribers/index' end |