Class: Boilerman::ActionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/boilerman/actions_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'app/controllers/boilerman/actions_controller.rb', line 5

def index
  default_filters = { controller_filters: [], # XXX Implemented
                      with_actions: [],
                      without_actions: [],
                      with_filters: [], # XXX Implemented
                      without_filters: [], # XXX Implemented
                      ignore_filters: [], # XXX Implemented
                      ignore_actions: [] } # XXX Implemented

  if params[:filters]
    filters = params[:filters].reverse_merge(default_filters)
  else
    filters = default_filters
  end

  @controller_filters = filters[:controller_filters]

  @with_actions       = filters[:with_actions]
  @without_actions    = filters[:without_actions]

  @with_filters       = filters[:with_filters] || []
  @without_filters    = filters[:without_filters]

  @ignore_filters     = filters[:ignore_filters]
  @ignore_actions     = filters[:ignore_actions]

  @action_filter_hash = Boilerman::Actions.get_action_hash(filters)
end