Class: MailyHerald::Webui::SubscriptionsController

Inherits:
ResourcesController show all
Defined in:
app/controllers/maily_herald/webui/subscriptions_controller.rb

Instance Method Summary collapse

Methods inherited from ResourcesController

#create, #destroy, #edit, #index, #new, #update

Methods inherited from ApplicationController

#expert_mode?, #work_mode

Methods included from MenuManager::ControllerExtensions

included

Methods included from Breadcrumbs::ControllerExtensions

included

Instance Method Details

#showObject



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/maily_herald/webui/subscriptions_controller.rb', line 6

def show
  super

  @list = @item.list

  add_breadcrumb @list.title || @list.name, list_path(@list)

  add_breadcrumb view_context.tw("subscriptions.show.users_subscription", user: @item.entity.to_s)

  @entity = @item
  smart_listing_create(:delivered_logs, @item.logs.delivered, :partial => "maily_herald/webui/logs/items", default_sort: {processing_at: "desc"})
  smart_listing_create(:scheduled_logs, @item.logs.scheduled, :partial => "maily_herald/webui/logs/items", default_sort: {processing_at: "asc"})
end

#toggleObject



20
21
22
23
# File 'app/controllers/maily_herald/webui/subscriptions_controller.rb', line 20

def toggle
  find_item
  @item.toggle!
end