module ActionController::HideActions::ClassMethods - actionpack-3.2.22 Documentation

# module ActionController::HideActions::ClassMethods

### Public Instance Methods

action_methods() click to toggle source

Overrides AbstractController::Base#action_methods to remove any methods that are listed as hidden methods.

Calls superclass method

    # File lib/action_controller/metal/hide_actions.rb, line 36
    def action_methods
      @action_methods ||= Set.new(super.reject { |name| hidden_actions.include?(name) }).freeze
    end

hide_action(*args) click to toggle source

Sets all of the actions passed in as hidden actions.

#### Parameters¶ ↑

- `args` - A list of actions

    # File lib/action_controller/metal/hide_actions.rb, line 26
    def hide_action(*args)
      self.hidden_actions = hidden_actions.dup.merge(args.map(&:to_s)).freeze
    end

visible_action?(action_name) click to toggle source

    # File lib/action_controller/metal/hide_actions.rb, line 30
    def visible_action?(action_name)
      not hidden_actions.include?(action_name)
    end