Class: ActionController::Resources::SingletonResource

Inherits:
Resource show all
Defined in:
lib/action_controller/resources.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from Resource

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

Instance Method Summary collapse

Methods inherited from Resource

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

Constructor Details

#initialize(entity, options) ⇒ SingletonResource

Returns a new instance of SingletonResource.



135
136
137
138
139
# File 'lib/action_controller/resources.rb', line 135

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