Class: ActionDispatch::Routing::Mapper::Resources::SingletonResource
    Do not use.  This class is for internal use only.
  
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
| Class Chain: 
          self,
           Resource | |
| Instance Chain: 
          self,
           Resource | |
| Inherits: | ActionDispatch::Routing::Mapper::Resources::Resource 
 | 
| Defined in: | actionpack/lib/action_dispatch/routing/mapper.rb | 
Class Method Summary
- .default_actions(api_only)
- .new(entities, api_only, shallow, options) ⇒ SingletonResource constructor
Resource - Inherited
Instance Attribute Summary
- #singleton? ⇒ Boolean readonly
Resource - Inherited
| #collection_scope | Alias for Resource#path. | 
| #controller, #param, #path, #shallow?, #singleton? | |
Instance Method Summary
- 
    
      #collection_name  
    
    Alias for #singular. 
- #default_actions
- 
    
      #member_name  
    
    Alias for #singular. 
- 
    
      #member_scope  
    
    Alias for Resource#path. 
- 
    
      #nested_scope  
    
    Alias for Resource#path. 
- #plural
- #singular (also: #member_name, #collection_name)
Resource - Inherited
| #actions, #available_actions, | |
| #collection_name | Checks for uncountable plurals, and appends “_index” if the plural and singular form are the same. | 
| #default_actions, | |
| #member_name | Alias for Resource#singular. | 
| #member_scope, #name, #nested_param, #nested_scope, #new_scope, #plural, #resource_scope, | |
| #shallow_scope | Alias for Resource#member_scope. | 
| #singular, #invalid_only_except_options | |
Constructor Details
    .new(entities, api_only, shallow, options)  ⇒ SingletonResource 
  
Class Method Details
.default_actions(api_only)
[ GitHub ]# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 1278
def default_actions(api_only) if api_only [:show, :create, :update, :destroy] else [:show, :create, :update, :destroy, :new, :edit] end end
Instance Attribute Details
    #singleton?  ⇒ Boolean  (readonly)
  
  [ GitHub ]
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 1312
def singleton?; true; end
Instance Method Details
#collection_name
Alias for #singular.
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 1307
alias :collection_name :singular
#default_actions
[ GitHub ]# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 1294
def default_actions self.class.default_actions(@api_only) end
#member_name
Alias for #singular.
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 1306
alias :member_name :singular
#member_scope
Alias for Resource#path.
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 1309
alias :member_scope :path
#nested_scope
Alias for Resource#path.
# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 1310
alias :nested_scope :path
#plural
[ GitHub ]# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 1298
def plural @plural ||= name.to_s.pluralize end
#singular Also known as: #member_name, #collection_name
[ GitHub ]# File 'actionpack/lib/action_dispatch/routing/mapper.rb', line 1302
def singular @singular ||= name.to_s end