module Outpost::Model::Identifier::ClassMethods

Public Instance Methods

content_key() click to toggle source
# File lib/outpost/model/identifier.rb, line 14
def content_key
  self.name.tableize.singularize
end
new_obj_key() click to toggle source
# File lib/outpost/model/identifier.rb, line 22
def new_obj_key
  obj_key(nil)
end
obj_key(id) click to toggle source
# File lib/outpost/model/identifier.rb, line 18
def obj_key(id)
  [self.content_key, id || "new"].join(OBJ_KEY_SEPARATOR)
end
route_key() click to toggle source

Wrappers for ActiveModel::Naming NewsStory => news_stories

# File lib/outpost/model/identifier.rb, line 28
def route_key
  ActiveModel::Naming.route_key(self)
end
singular_route_key() click to toggle source

NewsStory => news_story

# File lib/outpost/model/identifier.rb, line 33
def singular_route_key
  ActiveModel::Naming.singular_route_key(self)
end