class Ant::Storage::Datasource::IDGenerators

This class was meant to handle the complexity of extracting the primary key from an object that belongs to a model. This might get deprecated or suffer a huge refactor.

Public Class Methods

[](key) click to toggle source
# File lib/ant/storage/datasource/id_generators.rb, line 11
def self.[](key)
  resource(:generators, key)
end
normalize_id(object, key) click to toggle source
# File lib/ant/storage/datasource/id_generators.rb, line 15
def self.normalize_id(object, key)
  object.is_a?(Hash) ? object[key] : object
end