Module: ActiveScaffoldKanban::ConfigListAction

Defined in:
lib/active_scaffold_kanban/config_list.rb

Instance Method Summary collapse

Instance Method Details

#config_list_controller_nameObject



9
10
11
# File 'lib/active_scaffold_kanban/config_list.rb', line 9

def config_list_controller_name
  @kanban_view ? "#{super}:kanban" : super
end

#config_list_session_storage(storage = false) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/active_scaffold_kanban/config_list.rb', line 13

def config_list_session_storage(storage = false)
  if @kanban_view
    hsh = super()
    return hsh if storage
    hsh['kanban'] || {}
  else
    super()
  end
end

#config_list_session_storage_keyObject



5
6
7
# File 'lib/active_scaffold_kanban/config_list.rb', line 5

def config_list_session_storage_key
  @kanban_view ? "#{super}:kanban" : super
end

#delete_config_list_paramsObject



23
24
25
26
# File 'lib/active_scaffold_kanban/config_list.rb', line 23

def delete_config_list_params
  super
  config_list_session_storage(true).delete 'kanban' if @kanban_view
end

#save_config_list_paramsObject



28
29
30
31
32
33
# File 'lib/active_scaffold_kanban/config_list.rb', line 28

def save_config_list_params(...)
  unless active_scaffold_config.config_list.save_to_user && active_scaffold_current_user
    config_list_session_storage(true)['kanban'] ||= {} if @kanban_view
  end
  super
end