Class: UtopiaData::Resource::Name

Inherits:
ActiveModel::Name
  • Object
show all
Defined in:
lib/utopia_data/resource/naming.rb

Overview

A subclass of ActiveModel::Name which supports the different APIs presented in Rails < 3.1 and > 3.1.

Instance Method Summary collapse

Constructor Details

#initialize(klass, name = nil) ⇒ Name

Returns a new instance of Name.



61
62
63
# File 'lib/utopia_data/resource/naming.rb', line 61

def initialize(klass, name = nil)
  super(klass, nil, name)
end

Instance Method Details

#route_keyObject



65
66
67
# File 'lib/utopia_data/resource/naming.rb', line 65

def route_key
  plural
end