Class: MailyHerald::Webui::ListsController

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

Instance Method Summary collapse

Methods inherited from ResourcesController

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

Methods inherited from ApplicationController

#expert_mode?, #work_mode

Methods included from MenuManager::ControllerExtensions

included

Methods included from Breadcrumbs::ControllerExtensions

included

Instance Method Details

#context_variablesObject



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

def context_variables
  @context = MailyHerald.context(params[:context])

  render layout: "maily_herald/webui/modal"
end

#subscribeObject



6
7
8
9
10
11
# File 'app/controllers/maily_herald/webui/lists_controller.rb', line 6

def subscribe
  find_item

  @entity = @item.context.model.find params[:entity_id]
  @item.subscribe! @entity
end

#unsubscribeObject



13
14
15
16
17
18
# File 'app/controllers/maily_herald/webui/lists_controller.rb', line 13

def unsubscribe
  find_item

  @entity = @item.context.model.find params[:entity_id]
  @item.unsubscribe! @entity
end