Defines wich actions will be inherited from the inherited controller.
 Syntax is borrowed from resource_controller.

   actions :index, :show, :edit
   actions :all, :except => :index
1354
def actions(*actions_to_keep)
        raise ArgumentError, 'Wrong number of arguments. You have to provide which actions you want to keep.' if actions_to_keep.empty?

        options = actions_to_keep.extract_options!
        actions_to_remove = Array(options[:except])
        actions_to_remove += ACTIONS - actions_to_keep.map { |a| a.to_sym } unless actions_to_keep.first == :all
        actions_to_remove.map! { |a| a.to_sym }.uniq!
        (instance_methods.map { |m| m.to_sym } & actions_to_remove).each do |action|
          undef_method action, "#{action}!"
        end
      end
1359028
def actions(self):
        
        r = self.session.query(models.Action).all()
        return [x.type_name for x in r]
509860
def index
      @index_action = true
      @families = Family.all
  
      respond_to do |format|
        format.html # index.html.erb
        format.json { render json: @families }
      end
    end
241613
def alias_action(self, *args, **kwargs):
        
        to = kwargs.pop('to', None)
        if not to:
            return
        error_message = ("You can't specify target ({}) as alias "
                         "because it is real action name".format(to)
                         )
        if to in list(itertools.chain(*self.aliased_actions.values())):
            raise Exception(error_message)

        self.aliased_actions.setdefault(to, []).extend(args)
964437
def determine_actions(self, request, view):
        """"""
        from rest_framework.generics import GenericAPIView
        actions = {}
        excluded_methods = {'HEAD', 'OPTIONS', 'PATCH', 'DELETE'}
        for method in set(view.allowed_methods) - excluded_methods:
            view.request = clone_request(request, method)
            try:
                if isinstance(view, GenericAPIView):
                    has_object = view.lookup_url_kwarg or view.lookup_field in view.kwargs
                elif method in {'PUT', 'POST'}:
                    has_object = method in {'PUT'}
                else:
                    continue
                # Test global permissions
                if hasattr(view, 'check_permissions'):
                    view.check_permissions(view.request)
                # Test object permissions
                if has_object and hasattr(view, 'get_object'):
                    view.get_object()
            except (exceptions.APIException, PermissionDenied, Http404):
                pass
            else:
                # If user has appropriate permissions for the view, include
                # appropriate metadata about the fields that should be supplied.
                serializer = view.get_serializer()
                actions[method] = self.get_serializer_info(serializer)
            finally:
                view.request = request

        return actions
853442
def lookup_action #:nodoc:
      @lookup_action ||= begin
        action = template.controller && template.controller.action_name
        return unless action
        action = action.to_s
        ACTIONS[action] || action
      end
    end
408789
def edit_link(obj, options = {})
      if policy(obj).edit?
        url = polymorphic_url([:edit] + Array(obj))
        action_link('Edit', url, 'pencil', options)
      end
    end
1372884
def index_path(model_class, url_params: {})
      if url_params.is_a?(::ActionController::Parameters) \
        && !url_params.permitted?
        url_params = {}
      end

      url_for url_params.to_h.reverse_merge(
        resources: to_resources_name(model_class),
        action: :index
      )
    end
1060185
def actions(*action_names)
      [*action_names].each do |name| 
        if Arsenal.actions[name]
          # strategy_name, type, name
          @run_list << [self.name, Arsenal.actions[name].type, name]
        end
      end
    end
915085
def class_reference_from_action_alias(method_sym)
      alias_found = find_alias(method_sym.to_s)
      return nil unless alias_found

      class_reference_from_action_name(alias_found.to_sym)
    end
1021851
def upto( other, &action )
      i = @function.variable INT, 'i'
      @function << "#{@function.indent}for ( #{i} = #{self}; " +
                   "#{i} != #{ other + 1 }; #{i}++ ) {\n"
      @function.indent_offset +1
      action.call i
      @function.indent_offset -1
      @function << "#{@function.indent}};\n"
      self
    end
978615
def init_actions
      am = action_manager()
      am.add_action(Action.new("&Disable selection") { @selection_mode = :none; unbind_key(32); bind_key(32, :scroll_forward); } )
      am.add_action(Action.new("&Edit Toggle") { @edit_toggle = !@edit_toggle; $status_message.value = "Edit toggle is #{@edit_toggle}" })
    end
1287128
def get_action_definition(action_plugin = nil)
      plugins = action_plugin.nil? ? http_get('plugins') : [action_plugin]
      ret = {}
      plugins.each do |p|
        ret[p] = http_get("/plugins/#{p}")
      end
      ret
    end
388961
def edit(options = { only: [], except: [:id, :created_at, :updated_at], required: [] })
      @required_keys = options[:required]
      @attrs = CEO::Iterator.filter(@thing.attributes.keys, options)
      @model = @thing.model_name.name.constantize
      @route_name ||= @controller_name ||= controller_name
      @index_route = send(:"admin_#{@route_name}_path")

      render 'admin/edit'
    end
293245
def expand_action(data):
    
    # when given a string, assume user wants to index raw json
    if isinstance(data, string_types):
        return '{"index":{}}', data

    # make sure we don't alter the action
    data = data.copy()
    op_type = data.pop('_op_type', 'index')
    action = {op_type: {}}
    for key in ('_index', '_parent', '_percolate', '_routing', '_timestamp',
            '_ttl', '_type', '_version', '_version_type', '_id', '_retry_on_conflict'):
        if key in data:
            action[op_type][key] = data.pop(key)

    # no data payload for delete
    if op_type == 'delete':
        return action, None

    return action, data.get('_source', data)
529757
def action_dispatch_params
      action_dispatch_params = env['action_dispatch.request.path_parameters'] || {}
      action_dispatch_params.inject({}) {|hash, (key, value)| hash[key.to_s] = value; hash }
    end
1009965
def trigger(action_class, *args)
      if uses_concurrency_control
        trigger_with_concurrency_control(action_class, *args)
      else
        world.trigger { world.plan_with_options(action_class: action_class, args: args, caller_action: self) }
      end
    end