Sha256: e7651b9cee1351c73757a3f29298a0402be1527704e62b77036cfbb09a0a0548
Contents?: true
Size: 1.06 KB
Versions: 12
Compression:
Stored size: 1.06 KB
Contents
require 'hanami/routing/resource' require 'hanami/routing/resources/action' module Hanami module Routing # Set of RESTful resources routes # Implementation of Hanami::Router#resources # # @since 0.1.0 # # @api private # # @see Hanami::Router#resources class Resources < Resource # Set of default routes # # @api private # @since 0.1.0 self.actions = [:index, :new, :create, :show, :edit, :update, :destroy] # Action class # # @api private # @since 0.1.0 self.action = Resources::Action # Member action class # # @api private # @since 0.1.0 self.member = Resources::MemberAction # Collection action class # # @api private # @since 0.1.0 self.collection = Resources::CollectionAction # Return wildcard param between separators # # @api private # @since 0.4.0 def wildcard_param(route_param = nil) "/:#{ Hanami::Utils::String.new(route_param).singularize }_id/" end end end end
Version data entries
12 entries across 12 versions & 1 rubygems