Sha256: c3b43b48c0342e3a019994de744ef8bbfa39a0b5b7029ad28431c911c2b0ddac

Contents?: true

Size: 1.15 KB

Versions: 3

Compression:

Stored size: 1.15 KB

Contents

require_dependency "boilerman/application_controller"

module Boilerman
  class ActionsController < ApplicationController
    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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
boilerman-0.1.2 app/controllers/boilerman/actions_controller.rb
boilerman-0.1.1 app/controllers/boilerman/actions_controller.rb
boilerman-0.1.0 app/controllers/boilerman/actions_controller.rb