Class: ActionDispatch::Routing::DeprecatedMapper::SingletonResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/action_dispatch/routing/deprecated_mapper.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Resource

Resource::DEFAULT_ACTIONS

Instance Attribute Summary

Attributes inherited from Resource

#collection_methods, #defaults, #member_methods, #name_prefix, #new_methods, #options, #path_prefix, #path_segment, #plural, #singular

Instance Method Summary collapse

Methods inherited from Resource

#action_separator, #conditions, #controller, #has_action?, #nesting_name_prefix, #new_path, #path, #requirements, #uncountable?

Constructor Details

#initialize(entity, options, defaults) ⇒ SingletonResource

Returns a new instance of SingletonResource.



344
345
346
347
348
# File 'lib/action_dispatch/routing/deprecated_mapper.rb', line 344

def initialize(entity, options, defaults)
  @singular = @plural = entity
  options[:controller] ||= @singular.to_s.pluralize
  super
end