Class: Hanami::Routing::Resources Private

Inherits:
Resource
  • Object
show all
Defined in:
lib/hanami/routing/resources.rb,
lib/hanami/routing/resources/action.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Set of RESTful resources routes Implementation of Hanami::Router#resources

See Also:

Since:

  • 0.1.0

Defined Under Namespace

Modules: DefaultMemberAction, PluralizedAction Classes: Action, CollectionAction, Create, Destroy, Edit, Index, MemberAction, New, Show, Update

Constant Summary

Constants inherited from Resource

Hanami::Routing::Resource::NESTED_ROUTES_SEPARATOR

Instance Attribute Summary

Attributes inherited from Resource

#parent

Instance Method Summary collapse

Methods inherited from Resource

#initialize, #resource, #resources

Constructor Details

This class inherits a constructor from Hanami::Routing::Resource

Instance Method Details

#wildcard_param(route_param = nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return wildcard param between separators

Since:

  • 0.4.0


43
44
45
# File 'lib/hanami/routing/resources.rb', line 43

def wildcard_param(route_param = nil)
  "/:#{ Hanami::Utils::String.singularize(route_param) }_id/"
end