Class: ActiveAdmin::Resource::Name
- Inherits:
 - 
      ActiveModel::Name
      
        
- Object
 - ActiveModel::Name
 - ActiveAdmin::Resource::Name
 
 
- Defined in:
 - lib/active_admin/resource/naming.rb
 
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
 - 
  
    
      #initialize(klass, name = nil)  ⇒ Name 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Name.
 - #route_key ⇒ Object
 - #translate(options = {}) ⇒ Object
 
Constructor Details
#initialize(klass, name = nil) ⇒ Name
Returns a new instance of Name.
      45 46 47  | 
    
      # File 'lib/active_admin/resource/naming.rb', line 45 def initialize(klass, name = nil) super(klass, nil, name) end  | 
  
Instance Method Details
#eql?(other) ⇒ Boolean
      57 58 59  | 
    
      # File 'lib/active_admin/resource/naming.rb', line 57 def eql?(other) to_str.eql?(other.to_str) end  | 
  
#route_key ⇒ Object
      53 54 55  | 
    
      # File 'lib/active_admin/resource/naming.rb', line 53 def route_key plural end  | 
  
#translate(options = {}) ⇒ Object
      49 50 51  | 
    
      # File 'lib/active_admin/resource/naming.rb', line 49 def translate( = {}) I18n.t i18n_key, **{ scope: [:activerecord, :models] }.merge() end  |