def action_traits(list_of_actions)
      *list_of_actions, traits = list_of_actions if list_of_actions.last.is_a?(Hash)

      list_of_actions.reduce(traits || {}) do |memo, action|
        trait = ACTION_TRAITS.fetch(action) do
          raise Errors::RouterUnknownDefaultAction, action
        end

        memo.merge(action => trait)
      end
    end
def action_traits(list_of_actions)
      *list_of_actions, traits = list_of_actions if list_of_actions.last.is_a?(Hash)

      list_of_actions.reduce(traits || {}) do |memo, action|
        trait = ACTION_TRAITS.fetch(action) do
          raise Errors::RouterUnknownDefaultAction, action
        end

        memo.merge(action => trait)
      end
    end
Receives an array of symbols that represent actions for which the default traits
 should be used, and then lastly an optional trait configuration.

 Example is...

   [ :index, :show, { refund: { url: ':id/refund', method: 'post' } } ]

 ...which will load the default route for `show` and `index`, while also configuring
 a refund route.