Class: ActionController::Resources::SingletonResource
- Defined in:
- lib/action_controller/resources.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Resource
Instance Attribute Summary
Attributes inherited from Resource
#collection_methods, #member_methods, #name_prefix, #new_methods, #options, #path_prefix, #path_segment, #plural, #singular
Instance Method Summary collapse
-
#initialize(entity, options) ⇒ SingletonResource
constructor
A new instance of SingletonResource.
Methods inherited from Resource
#action_separator, #conditions, #controller, #has_action?, #nesting_name_prefix, #new_path, #path, #requirements, #uncountable?
Constructor Details
#initialize(entity, options) ⇒ SingletonResource
Returns a new instance of SingletonResource.
174 175 176 177 178 |
# File 'lib/action_controller/resources.rb', line 174 def initialize(entity, ) @singular = @plural = entity [:controller] ||= @singular.to_s.pluralize super end |